mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-23 00:17:42 +00:00
Use execve directly
This commit is contained in:
parent
39dbffadfe
commit
db99caf258
@ -65,6 +65,7 @@ EXPORT_SYMBOL(fchmodat);
|
|||||||
EXPORT_SYMBOL(fchownat);
|
EXPORT_SYMBOL(fchownat);
|
||||||
EXPORT_SYMBOL(readv);
|
EXPORT_SYMBOL(readv);
|
||||||
EXPORT_SYMBOL(lseek);
|
EXPORT_SYMBOL(lseek);
|
||||||
|
EXPORT_SYMBOL(execve);
|
||||||
|
|
||||||
SYMBOL_ALIAS(exit, _exit);
|
SYMBOL_ALIAS(exit, _exit);
|
||||||
|
|
||||||
|
@ -243,7 +243,7 @@ void BaseInit::exec_init() {
|
|||||||
if (xumount2(p.data(), MNT_DETACH) == 0)
|
if (xumount2(p.data(), MNT_DETACH) == 0)
|
||||||
LOGD("Unmount [%s]\n", p.data());
|
LOGD("Unmount [%s]\n", p.data());
|
||||||
}
|
}
|
||||||
execv("/init", argv);
|
execve("/init", argv, environ);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,6 +403,6 @@ int magisk_proxy_main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// Tell magiskd to remount rootfs
|
// Tell magiskd to remount rootfs
|
||||||
setenv("REMOUNT_ROOT", "1", 1);
|
setenv("REMOUNT_ROOT", "1", 1);
|
||||||
execv("/sbin/magisk", argv);
|
execve("/sbin/magisk", argv, environ);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user