Fix execution in Magisk binary for uninstallation

This commit is contained in:
topjohnwu 2017-06-04 00:35:45 +08:00
parent 17684ed8a8
commit b9a012c6e3

View File

@ -492,8 +492,7 @@ void post_fs_data(int client) {
// uninstaller // uninstaller
if (access(UNINSTALLER, F_OK) == 0) { if (access(UNINSTALLER, F_OK) == 0) {
close(open(UNBLOCKFILE, O_RDONLY | O_CREAT)); close(open(UNBLOCKFILE, O_RDONLY | O_CREAT));
char *const command[] = { "sh", "-c", "BOOTMODE=true sh " UNBLOCKFILE, NULL }; system("(BOOTMODE=true sh " UNINSTALLER ") &");
run_command(NULL, "/system/bin/sh", command);
return; return;
} }