mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 13:47:44 +02:00
Start Magisk in SAR
This commit is contained in:
@ -108,6 +108,12 @@ static void main_daemon() {
|
||||
setcon("u:r:" SEPOL_PROC_DOMAIN ":s0");
|
||||
restore_rootcon();
|
||||
|
||||
// Unmount pre-init patches
|
||||
umount2("/init", MNT_DETACH);
|
||||
umount2("/init.rc", MNT_DETACH);
|
||||
umount2("/system/lib/libselinux.so", MNT_DETACH);
|
||||
umount2("/system/lib64/libselinux.so", MNT_DETACH);
|
||||
|
||||
int fd = xopen("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
xdup2(fd, STDOUT_FILENO);
|
||||
xdup2(fd, STDERR_FILENO);
|
||||
|
Reference in New Issue
Block a user