mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-06-13 13:47:44 +02:00
Maintain a list of pre-init mounts
Keep track of everything to unmount
This commit is contained in:
@ -109,10 +109,12 @@ static void main_daemon() {
|
||||
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);
|
||||
if (access(ROOTMNT, F_OK) == 0) {
|
||||
file_readline(ROOTMNT, [](auto line) -> bool {
|
||||
umount2(line.data(), MNT_DETACH);
|
||||
return true;
|
||||
}, true);
|
||||
}
|
||||
|
||||
int fd = xopen("/dev/null", O_RDWR | O_CLOEXEC);
|
||||
xdup2(fd, STDOUT_FILENO);
|
||||
|
Reference in New Issue
Block a user