I try to understand the SpecializeCommon function of system_server . It flows fine and the correct setcontext is indeed selinux_android_setcontext(1000, 1, "(null)", "(null)").
I guess it might be because of type=1401 audit(0.0:806): op=security_bounded_transition seresult=denied oldcontext=u:r:zygote:s0 newcontext=u:r:system_server_startup:s0.
But it's not clear to me what the root cause of this problem is.
Not sure if it's appropriate to ask this question here, thanks for taking care.
Device: Redmi Note 9 4G(lime) Android version: Android 12 Magisk version name: 25.2 Magisk version code:25200
In the Zygisk module, preServerSpecialize is used to hook the
system_server
process.When I use dlopen in preServerSpecialize to try to load frida's gadget.so, it is successfully loaded into memory and executed.
But when preServerSpecialize returns, something unexpected happens, causing system_server to crash.
Then I observed this log in logcat:
Seems to be caused by calling selinux_android_setcontext inside the SpecializeCommon function.
I try to understand the SpecializeCommon function of system_server . It flows fine and the correct setcontext is indeed
selinux_android_setcontext(1000, 1, "(null)", "(null)")
.I guess it might be because of
type=1401 audit(0.0:806): op=security_bounded_transition seresult=denied oldcontext=u:r:zygote:s0 newcontext=u:r:system_server_startup:s0
.But it's not clear to me what the root cause of this problem is.
Not sure if it's appropriate to ask this question here, thanks for taking care.