Compare

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

MagiskAPatch
Latest releasev31.1 stable (October 25, 2026); v30.7 (Feb 23, 2026) is the last for Android 6.0Build 11282 (Oct 15, 2026)
How it rootsPatches the boot ramdisk. magiskinit starts first and root runs in userspace.Patches the kernel image with KernelPatch; root is granted from the kernel
ArchitectureARM, ARM64, x86 and x86_64 (the release APK ships all four)ARM64 only
Kernel versionsNot kernel-dependentAndroid kernels 3.18 to 6.12; not limited to GKI. Needs CONFIG_KALLSYMS=y (and CONFIG_KALLSYMS_ALL=y for full support).
Image patchedinit_boot, boot, vendor_boot or recovery, depending on the phoneboot.img only; its install guide says not to patch or flash init_boot
ModulesMagisk modules, mounted by MagiskAPM (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.
ZygiskBuilt inNot built in. Use ReZygisk or NeoZygisk (open source) or Zygisk Next. See the comparison.
RemovalUninstall Magisk → Complete UninstallThe manager's UnPatch mode, an “uninstall” zip in recovery, or flashing the stock boot.img

Magisk and APatch feature by feature

FeatureMagiskAPatch
32-bit ARM and x86 devicesYesNoARM64 only
Any kernel versionYesPartly3.18 to 6.12, needs CONFIG_KALLSYMS
Installs on init_boot devicesYesPatches init_bootYesPatches boot, never init_boot
Magisk-style modulesYesYesAPM, mounted by a metamodule
Kernel modules with inline hooksNoYesKPM
Zygisk built inYesNoAdd it as a module
Per-app module hidingYesDenyListYes“Exclude modifications”
Keep root through an A/B OTAYesInstall to Inactive SlotYesInstall to inactive slot (After OTA)
Samsung devicesYesPatches the AP fileNo“Planned” in the README
Root works without a secret keyYesNoSuperKey required
Magisk v31.1 and APatch build 11282, from apatch.dev, the APatch README, its manager's strings at build 11282 and Magisk's documentation. Checked October 26, 2026.

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.

  1. Check APatch's requirements while you still have root

    3 minutes

    APatch 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 print arm64-v8a and the last should print CONFIG_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.

  2. Get both stock images

    10 minutes

    From the firmware for your exact build, extract boot.img, and also init_boot.img if the firmware has one. You need boot.img for APatch and init_boot.img to remove Magisk cleanly. The boot image guide shows where to find them. Download the latest zip of each module you use, too.

  3. Uninstall Magisk and flash stock images

    5 minutes

    Tap 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 in init_boot and APatch only touches boot, 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
  4. Patch boot.img with a strong SuperKey

    3 minutes

    Install 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.

  5. Flash the patched boot image

    2 minutes

    Copy the patched image to your computer. APatch's guide suggests trying it once with fastboot boot if your phone supports that, then flashing it to boot. Never flash it to init_boot.

    Flash APatch
    $adb reboot bootloader $fastboot flash boot apatch_patched.img $fastboot reboot

    Use the file name APatch shows at the end of patching. If the phone doesn't boot, flash the stock boot.img again.

  6. Unlock the manager and reinstall modules

    10 minutes

    Open 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

  1. Remove APatch: either open the manager's Patch screen and use the Uninstall KPatch mode (UnPatch), or flash the stock boot.img with fastboot 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).
  2. Boot once and confirm root is gone. Uninstall the APatch app.
  3. Install Magisk by patching the stock image: init_boot.img if your firmware has one, otherwise boot.img. Follow the install guide.
  4. 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.

Sources

This page is written from the sources below. If anything here disagrees with them, the upstream source is correct.

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