You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
This commit adds the first base for C99 zygiskd, that is not fully working or code-ready.
37 lines
1009 B
C
37 lines
1009 B
C
#ifndef UTILS_H
|
|
#define UTILS_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include "constants.h"
|
|
|
|
#define LOGI(...) \
|
|
__android_log_print(ANDROID_LOG_INFO, lp_select("zygiskd32", "zygiskd64"), __VA_ARGS__); \
|
|
printf(__VA_ARGS__)
|
|
|
|
#define LOGE(...) \
|
|
__android_log_print(ANDROID_LOG_INFO , lp_select("zygiskd32", "zygiskd64"), __VA_ARGS__); \
|
|
printf(__VA_ARGS__)
|
|
|
|
void switch_mount_namespace(pid_t pid);
|
|
|
|
void get_property(const char *name, char *output);
|
|
|
|
void set_socket_create_context(const char *context);
|
|
|
|
void unix_datagram_sendto(const char *path, void *buf, size_t len);
|
|
|
|
int chcon(const char *path, const char *context);
|
|
|
|
int unix_listener_from_path(char *path);
|
|
|
|
ssize_t send_fd(int sockfd, int fd);
|
|
|
|
ssize_t recv_fd(int sockfd, int *fd);
|
|
|
|
ssize_t write_string(int fd, const char *str);
|
|
|
|
ssize_t read_string(int fd, char *str, size_t len);
|
|
|
|
#endif /* UTILS_H */
|