• topjohnwu's avatar
    Fix root loss issue when MagiskHide is enabled · 44395e8f
    topjohnwu authored
    In previous implementations, proc_monitor checks whether the mount namespace of an app is actually separated from zygote using a list generated at startup.
    However, for some unknown reason, some devices (e.g. Samsung) has multiple zygote servers running in the background.
    This means that app processes spawned from the unlisted zygotes are not checked whether the separation is done or not, causing MagiskHide unmount stuffs in the namespace of zygote, and since zygote is the "mother" of all apps, all apps will no longer have root access.
    
    Since I'm not sure of the reason why multiple zygotes exists, so instead of checking the namespace against a list, compare the current namespace against the parent process's namespace.
    This will make sure the namespace is NOT the same as the parent process, which is supposed to be the zygote server.
    44395e8f
Name
Last commit
Last update
..
core Loading commit data...
external Loading commit data...
include Loading commit data...
magiskboot Loading commit data...
magiskhide Loading commit data...
magiskpolicy @ c69dc0f0 Loading commit data...
resetprop Loading commit data...
su @ 29d57402 Loading commit data...
utils Loading commit data...
Android.mk Loading commit data...
Application.mk Loading commit data...
b64xz.c Loading commit data...