mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-12 05:07:45 +02:00
New method of communication
Introduce a new communication method between Magisk and Magisk Manager. Magisk used to hardcode classnames and send broadcast/start activities to specific components. This new method makes no assumption of any class names, so Magisk Manager can easily be fully obfuscated. In addition, the new method connects Magisk and Magisk Manager with random abstract Linux sockets instead of socket files in filesystems, bypassing file system complexities (selinux, permissions and such)
This commit is contained in:
@ -59,13 +59,21 @@ int check_and_start_logger();
|
||||
|
||||
// socket.c
|
||||
|
||||
int setup_socket(struct sockaddr_un *sun, daemon_t d);
|
||||
socklen_t setup_sockaddr(struct sockaddr_un *sun, daemon_t d);
|
||||
int create_rand_socket(struct sockaddr_un *sun);
|
||||
int socket_accept(int serv_fd, int timeout);
|
||||
int recv_fd(int sockfd);
|
||||
void send_fd(int sockfd, int fd);
|
||||
int read_int(int fd);
|
||||
int read_int_be(int fd);
|
||||
void write_int(int fd, int val);
|
||||
char* read_string(int fd);
|
||||
void write_string(int fd, const char* val);
|
||||
void write_int_be(int fd, int val);
|
||||
char *read_string(int fd);
|
||||
char *read_string_be(int fd);
|
||||
void write_string(int fd, const char *val);
|
||||
void write_string_be(int fd, const char *val);
|
||||
void write_key_value(int fd, const char *key, const char *val);
|
||||
void write_key_token(int fd, const char *key, int tok);
|
||||
|
||||
/***************
|
||||
* Boot Stages *
|
||||
|
Reference in New Issue
Block a user