Magisk vs APatch
APatch roots Android by patching the kernel inside boot.img with KernelPatch, protected by a SuperKey you choose. It runs Magisk-style modules (APM) and kernel modules (KPM). Magisk patches the boot ramdisk instead, which is why their device requirements differ so much.
Last updated 12 sourcesHow we check pages
Short answer
Choose Magisk for the widest device support (including Samsung and non-ARM64 devices), built-in Zygisk and the most documentation. Choose APatch on an ARM64 phone with a kernel between 3.18 and 6.12 if you want kernel modules (KPM), or if your kernel isn't GKI and you want root from the kernel without building one. On a GKI phone, compare KernelSU vs APatch too.
At a glance
| Magisk | APatch | |
|---|---|---|
| Latest release | v31.1 stable (October 25, 2026); v30.7 (Feb 23, 2026) is the last for Android 6.0 | Build 11282 (Oct 15, 2026) |
| How it roots | Patches the boot ramdisk. magiskinit starts first and root runs in userspace. | Patches the kernel image with KernelPatch; root is granted from the kernel |
| Architecture | ARM, ARM64, x86 and x86_64 (the release APK ships all four) | ARM64 only |
| Kernel versions | Not kernel-dependent | Android kernels 3.18 to 6.12; not limited to GKI. Needs CONFIG_KALLSYMS=y (and CONFIG_KALLSYMS_ALL=y for full support). |
| Image patched | init_boot, boot, vendor_boot or recovery, depending on the phone | boot.img only; its install guide says not to patch or flash init_boot |
| Modules | Magisk modules, mounted by Magisk | APM (Magisk-like modules, mounted by a metamodule since build 11219) and KPM (kernel modules that can inline-hook kernel functions or hook the system call table). Modules with a WebUI open from a WebUI button in the manager. |
| Zygisk | Built in | Not built in. Use ReZygisk or NeoZygisk (open source) or Zygisk Next. See the comparison. |
| Removal | Uninstall Magisk → Complete Uninstall | The manager's UnPatch mode, an “uninstall” zip in recovery, or flashing the stock boot.img |
Magisk and APatch feature by feature
| Feature | Magisk | APatch |
|---|---|---|
| 32-bit ARM and x86 devices | Yes | NoARM64 only |
| Any kernel version | Yes | Partly3.18 to 6.12, needs CONFIG_KALLSYMS |
| Installs on init_boot devices | YesPatches init_boot | YesPatches boot, never init_boot |
| Magisk-style modules | Yes | YesAPM, mounted by a metamodule |
| Kernel modules with inline hooks | No | YesKPM |
| Zygisk built in | Yes | NoAdd it as a module |
| Per-app module hiding | YesDenyList | Yes“Exclude modifications” |
| Keep root through an A/B OTA | YesInstall to Inactive Slot | YesInstall to inactive slot (After OTA) |
| Samsung devices | YesPatches the AP file | No“Planned” in the README |
| Root works without a secret key | Yes | NoSuperKey required |
How APatch works
APatch has two parts, which its manager calls KernelPatch and AndroidPatch. KernelPatch is inserted into the kernel image in boot.img. It finds kernel symbols at boot (hence the CONFIG_KALLSYMS requirement), adds a “SuperCall” that grants privileges to callers that present the SuperKey, and can load KPM modules that hook kernel functions or the system call table. AndroidPatch provides su, the Superuser list and APM modules on top of that. APatch's README says its UI and APModule code were derived from KernelSU, which is why the two managers look alike.
Magisk never touches kernel code. It replaces init in the boot ramdisk, patches the SELinux policy, and starts its daemon early in boot. That is why Magisk works on almost any kernel but can't offer kernel modules. Magisk's documentation overview explains its parts.
The SuperKey
You set a SuperKey when patching. APatch's README warns that the SuperKey “has higher privileges than root access”, and that a weak or exposed key can let someone take control of the device. Its install guide requires 8 to 63 letters and numbers, no special characters, and rejects weak keys such as 12345678. Installs flashed directly from recovery get a random key, so repatch in the manager if you want to choose one. A change making the key optional (pull request #1446) was merged in April 2026 and then reverted, so treat the SuperKey as required. Magisk has no equivalent: apps get root through the Superuser tab.
Switching from Magisk to APatch
The usual mistake is leaving Magisk in init_boot while APatch goes into boot. Remove Magisk completely and return both partitions to stock first. The bootloader stays unlocked, so your data is kept.
-
Check APatch's requirements while you still have root
3 minutesAPatch needs an ARM64 device, a kernel from 3.18 to 6.12 and
CONFIG_KALLSYMS=y. Reading the kernel config needs root, so check it now, before removing Magisk. The first command should printarm64-v8aand the last should printCONFIG_KALLSYMS=y.Check architecture, kernel and config$adb shell getprop ro.product.cpu.abi $adb shell uname -r $adb shell su -c 'zcat /proc/config.gz | grep -w CONFIG_KALLSYMS'If any check fails, stay on Magisk. APatch's guide says kernel 6.6 has only been tried on Xiaomi and OnePlus devices.
-
Get both stock images
10 minutesFrom the firmware for your exact build, extract
boot.img, and alsoinit_boot.imgif the firmware has one. You needboot.imgfor APatch andinit_boot.imgto remove Magisk cleanly. The boot image guide shows where to find them. Download the latest zip of each module you use, too. -
Uninstall Magisk and flash stock images
5 minutesTap Uninstall Magisk → Complete Uninstall in the Magisk app. It restores the image Magisk patched, deletes
/data/adb/modules, removes the app and reboots. Then flash the stock images yourself so you know both partitions are clean. This matters on init_boot phones: Magisk lives ininit_bootand APatch only touchesboot, so a leftover Magisk would keep running next to APatch.Flash stock images$adb reboot bootloader # Only if your firmware has init_boot.img $fastboot flash init_boot init_boot.img $fastboot flash boot boot.img $fastboot reboot -
Patch boot.img with a strong SuperKey
3 minutesInstall APatch from its GitHub releases. Tap Patch, choose Select boot, pick the stock
boot.img, set a SuperKey of 8 to 63 letters and numbers with no special characters, and tap Start. Write the SuperKey down somewhere safe. -
Flash the patched boot image
2 minutesCopy the patched image to your computer. APatch's guide suggests trying it once with
fastboot bootif your phone supports that, then flashing it toboot. Never flash it toinit_boot.Flash APatch$adb reboot bootloader $fastboot flash boot apatch_patched.img $fastboot rebootUse the file name APatch shows at the end of patching. If the phone doesn't boot, flash the stock
boot.imgagain. -
Unlock the manager and reinstall modules
10 minutesOpen APatch and enter your SuperKey. Since build 11219, APM modules are mounted by a metamodule, so install one first, then a Zygisk module if you need Zygisk (APatch's FAQ lists ZygiskNext, ReZygisk and NeoZygisk), then the rest. APatch's FAQ says it can't support the closed-source Shamiko.
Going back from APatch to Magisk
- Remove APatch: either open the manager's Patch screen and use the Uninstall KPatch mode (UnPatch), or flash the stock
boot.imgwithfastboot flash boot boot.img, which is APatch's documented manual uninstall. With a custom recovery, flashing the APatch APK renamed to a zip with “uninstall” in its name also works (version 10888 or later). - Boot once and confirm root is gone. Uninstall the APatch app.
- Install Magisk by patching the stock image:
init_boot.imgif your firmware has one, otherwiseboot.img. Follow the install guide. - Reinstall your modules. Skip KPMs, metamodules and Zygisk modules: Magisk can't load KPMs and includes its own mounting and Zygisk.
Which should you use?
- Magisk if your phone is a Samsung, isn't ARM64, has a kernel outside 3.18 to 6.12, or you want something that works the same way on every phone you own.
- APatch if you want KPM kernel modules, or root from the kernel on a non-GKI phone where building KernelSU isn't an option. APatch's FAQ makes this point: KernelSU on such phones needs kernel source, APatch only needs the stock
boot.img.
APatch's README says its documentation “is currently not quite complete” and may change. Check apatch.dev for current instructions.
Common questions
Is APatch safe? What is the SuperKey for?
The SuperKey is the credential for KernelPatch's “SuperCall”: any process that supplies it gets kernel-level privileges. APatch's README warns that it “has higher privileges than root access” and that a weak or leaked key can let someone take control of the device. Use a long random key and never paste it into an app or website you don't trust.
Can I use APatch without a SuperKey?
Not reliably. A change to make the SuperKey optional (pull request #1446) was merged in April 2026 and then reverted, and build 11219's notes say patching now enforces a strong SuperKey. The manager at build 11282 still asks you to set one. Installs flashed from recovery get a random key; repatch in the manager to choose your own.
Why does APatch say not to patch init_boot?
Because APatch modifies the kernel, and the kernel lives in boot. Android's documentation says phones launching with Android 13 put the generic ramdisk in init_boot and leave only the kernel in boot. Magisk patches the ramdisk, so it uses init_boot on those phones. That difference is also why you must restore stock init_boot when switching from Magisk.
Does APatch work on Android 16 or 17?
It depends on the kernel, not the Android version. APatch documents kernels 3.18 to 6.12. A phone on Android 17 with an older kernel can work; a kernel newer than 6.12, such as the android17-6.18 branch KernelSU added in v3.3.0, is outside APatch's documented range. Check with adb shell uname -r.
Does APatch work on Samsung?
The README lists support for “Samsung devices with security protection” as planned. Magisk supports Samsung through AP file patching; see the Samsung guide (and note that US and Canada models can't be unlocked).
Do Magisk modules work on APatch?
Most do as APM modules once a metamodule is installed. APatch's module guide says its module code was copied from KernelSU and lists the differences for module authors. Modules that need Zygisk need a Zygisk module. KPM modules are a separate kind that only APatch (and the SukiSU Ultra fork of KernelSU) can load.
Should I update APatch to every new build?
Not necessarily. Build 11282's notes warn that upgrading carries risk, that embedded KPMs should be uninstalled first, and that the build mainly adapts APatch to the newest Pengpai 4.0 kernel, so other users don't need it. Read each release's notes before updating.
No match. Try another word from the error message.
Sources
This page is written from the sources below. If anything here disagrees with them, the upstream source is correct.
- APatch installation guide (apatch.dev)
- APatch FAQ (apatch.dev)
- APatch module guide (apatch.dev)
- APatch metamodules (apatch.dev)
- APatch releases, including builds 11219 and 11282 (bmax121)
- APatch manager strings at build 11282 (bmax121/APatch)
- APatch pull request #1446: optional SuperKey, merged then reverted
- APatch README (bmax121/APatch)
- KernelPatch (bmax121/KernelPatch)
- Magisk installation guide (topjohnwu)
- Magisk uninstaller script (topjohnwu/Magisk)
- Generic boot partition and init_boot (Android Open Source Project)
Found a mistake or something out of date? Tell us and we will check it against the source and fix the page. Confirmed corrections are listed in the corrections log.
Report a problem with this page