APatch
The patching of Android kernel and Android system
An Android rooting tool that patches the kernel directly, supports existing Magisk-compatible modules, and allows deep kernel-level code injection on 64-bit ARM devices.
APatch is a root solution for Android devices that works at the kernel level. Rooting an Android phone means gaining administrator-level access to the operating system, which lets you make changes that are normally blocked, such as modifying system files or running special apps. APatch achieves this by patching the Android kernel directly, rather than using the more common method of replacing the boot image.
The project has two module systems. The first, called APM, supports modules in the same format as Magisk, a widely used rooting tool, so existing Magisk modules work with APatch. The second, called KPM, goes deeper and lets developers inject code directly into the running kernel. This allows for advanced modifications like hooking kernel functions, which is a technique used to intercept or alter how the operating system handles certain operations at a very low level.
APatch is built on top of another project called KernelPatch and its app interface was derived from KernelSU, another kernel-based root tool. It only supports 64-bit ARM devices and Android kernel versions between 3.18 and 6.12. Two specific kernel configuration flags must be enabled in the device's kernel for it to work.
The README includes a security warning: APatch uses a SuperKey during setup that grants higher-than-root privileges, and using a weak key or exposing it could allow someone else to take control of your device. The project is available on F-Droid and through GitHub releases. It is licensed under the GNU General Public License v3.
Where it fits
- Root a 64-bit ARM Android device by patching its kernel using APatch.
- Run existing Magisk modules on a kernel-patched Android device through the APM module system.
- Inject custom code into a running Android kernel to intercept or modify low-level OS operations.