• topjohnwu's avatar
    Fix Magisk Hide losing root issue · b6412afe
    topjohnwu authored
    This is the issue that has been haunting since day 1. Root and mounted files randomly disappears, and only an reboot can fix it.
    The issue is that Zygote requires some time to isolate the mount namespace for the children it forks (read: most processes), so in rare cases such as the CPU is on heavy load, or CPU is in deep sleep, it takes longer than usual to finish the mount namespace isolation. Magisk Hide kicks in before the isolation is done, and it will switch to Zygote's namespace and do the unmounting. All children will then lose the mounted files, which includes root.
    The solution is to first find the namespace id of Zygote, and wait a small period of time and retry if the namespace isn't isolated yet.
    b6412afe
Name
Last commit
Last update
..
bootimgtools Loading commit data...
resetprop @ 96949566 Loading commit data...
selinux @ 91e9179a Loading commit data...
sepolicy-inject @ f760a9d0 Loading commit data...
su @ 8475cecf Loading commit data...
Android.mk Loading commit data...
Application.mk Loading commit data...
magiskhide.c Loading commit data...