APatch is a root solution similar to Magisk or KernelSU, but APatch offers even more.
- Magisk modify init, APatch patch linux kernel.
- KernelSU require source. Only boot.img for APatch is enough.
- Optionally don't modify SELinux. Root in android app context, no libsu and IPC needed
- Kernel Patch Module provided
Some code runs in Kernel Space, similar to Loadable Kernel Modules (LKM).
Additionally, KPM provides the ability to do inline-hook, syscall-table-hook in kernel space.
APatch depends on KernelPatch, inherits all its capabilities, and has been expanded.
You can install KernelPatch only, but this will not allow you to use the magisk module,
and to use superuser management, you needs to install AndroidPatch and then uninstall it.
KernelPatch hooks system calls to provide all capability to user space, and this system call is referred to as SuperCall.
Invoking SuperCall requires passing a credential, known as the SuperKey.
SuperCall can only be successfully invoked when the SuperKey is correct; if the SuperKey is incorrect, the caller remains unaffected.
- KernelPatch don't modify selinux context and bypass selinux via hook,
This allows you to root an Android thread within the app context without the need to use libsu to start a new process and then perform IPC. This is very convenient. - In addition, APatch directly utilizes magiskpolicy to provide additional SELinux support.
However, only this will be detected as Magisk. Anyone interested can try to bypass it, the issue is already quite clear.