Make private applets hidden

This commit is contained in:
topjohnwu
2022-08-27 14:50:28 -07:00
parent 646260ad6d
commit 38325e708e
3 changed files with 48 additions and 26 deletions
+5 -6
View File
@@ -46,17 +46,16 @@ int app_process_main(int argc, char *argv[]) {
fcntl(fds[1], F_SETFD, 0);
snprintf(buf, sizeof(buf), "%d", fds[1]);
#if defined(__LP64__)
execlp("magisk", "zygisk", "passthrough", buf, "1", (char *) nullptr);
execlp("magisk", "", "zygisk", "passthrough", buf, "1", (char *) nullptr);
#else
execlp("magisk", "zygisk", "passthrough", buf, "0", (char *) nullptr);
execlp("magisk", "", "zygisk", "passthrough", buf, "0", (char *) nullptr);
#endif
exit(-1);
}
close(fds[1]);
if (read_int(fds[0]) != 0) {
fprintf(stderr, "Failed to connect magisk daemon, "
"try umount %s or reboot.\n", argv[0]);
fprintf(stderr, "Failed to connect magiskd, try umount %s or reboot.\n", argv[0]);
return 1;
}
int app_proc_fd = recv_fd(fds[0]);
@@ -131,8 +130,8 @@ static void zygiskd(int socket) {
struct stat s{};
if (fstat(fd, &s) == 0 && S_ISREG(s.st_mode)) {
android_dlextinfo info {
.flags = ANDROID_DLEXT_USE_LIBRARY_FD,
.library_fd = fd,
.flags = ANDROID_DLEXT_USE_LIBRARY_FD,
.library_fd = fd,
};
if (void *h = android_dlopen_ext("/jit-cache", RTLD_LAZY, &info)) {
*(void **) &entry = dlsym(h, "zygisk_companion_entry");