This commit is contained in:
zhaarey
2024-12-20 17:34:58 +08:00
parent caf52b1f91
commit de7cff2b54
13 changed files with 95 additions and 634 deletions

View File

@@ -1,6 +1,6 @@
#define _GNU_SOURCE
#include <errno.h>
#include <sched.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
@@ -35,21 +35,19 @@ int main(int argc, char *argv[], char *envp[]) {
chmod("/system/bin/linker64", 0755);
chmod("/system/bin/main", 0755);
if (unshare(CLONE_NEWPID)) {
perror("unshare");
return 1;
}
child_proc = fork();
if (child_proc == -1) {
perror("fork");
return 1;
}
if (child_proc > 0) {
close(STDOUT_FILENO);
wait(NULL);
wait(NULL); // Parent waits for the child process to terminate
return 0;
}
// Child process logic
mkdir("/data/data/com.apple.android.music/files", 0777);
mkdir("/data/data/com.apple.android.music/files/mpl_db", 0777);
execve("/system/bin/main", argv, envp);