whatisgithub

What is apatch?

bmax121/apatch — explained in plain English

Analysis updated 2026-06-24

7,464KotlinAudience · developerComplexity · 5/5LicenseSetup · hard

In one sentence

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.

Mindmap

mindmap
  root((APatch))
    What it does
      Kernel-level rooting
      Magisk module support
      Kernel code injection
    Module systems
      APM modules
      KPM kernel hooks
    Requirements
      64-bit ARM only
      Android kernel 3.18-6.12
      Kernel config flags
    Audience
      Android developers
      Security researchers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Root a 64-bit ARM Android device by patching its kernel using APatch.

USE CASE 2

Run existing Magisk modules on a kernel-patched Android device through the APM module system.

USE CASE 3

Inject custom code into a running Android kernel to intercept or modify low-level OS operations.

What is it built with?

KotlinCAndroidARM

How does it compare?

bmax121/apatchackites/nrfrarisguimera/android-expert
Stars7,4647,4917,322
LanguageKotlinKotlinKotlin
Setup difficultyhardmoderatemoderate
Complexity5/53/51/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1day+

Requires a 64-bit ARM device with Android kernel version 3.18, 6.12 and two specific kernel config flags enabled. Risk of bricking device if misapplied.

Licensed under GPL v3: you can use, modify, and distribute freely, but any modifications you distribute must also be released under GPL v3.

So what is it?

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.

Copy-paste prompts

Prompt 1
How do I use APatch to root my 64-bit ARM Android phone, and what kernel configuration flags must be enabled beforehand?
Prompt 2
I have a Magisk module I want to run with APatch. What steps do I follow to install it using the APM module system?
Prompt 3
Explain the difference between APatch APM modules and KPM modules, and when I would use kernel function hooking via KPM.
Prompt 4
What SuperKey security risks does APatch warn about, and how do I choose a strong key during setup?

Frequently asked questions

What is apatch?

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.

What language is apatch written in?

Mainly Kotlin. The stack also includes Kotlin, C, Android.

What license does apatch use?

Licensed under GPL v3: you can use, modify, and distribute freely, but any modifications you distribute must also be released under GPL v3.

How hard is apatch to set up?

Setup difficulty is rated hard, with roughly 1day+ to a first successful run.

Who is apatch for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.