Home / Guide / Packages

Magisk Zip Explained: APK, Zip and Recovery Installation

One file, three jobs. How the Magisk APK doubles as a flashable zip and an uninstaller, and when recovery installation is still the right choice.

3D archive box showing the contents shared by the Magisk APK and Magisk zip

One file with more than one job

Readers who return to Android rooting after a few years away are often surprised by how Magisk is distributed today. In the past there were two separate downloads: a Magisk zip that you flashed in a custom recovery such as TWRP, and a separate Magisk Manager app that you installed afterwards. Many older tutorials still describe that arrangement, and people search for a standalone Magisk zip that no longer exists in the release list.

Since version 22 the project ships a single file. The Magisk APK is a normal Android application package, and it also contains everything that used to live in the flashable zip. An APK is technically a zip archive with a particular structure, so the same file can serve both roles. Which role it plays depends on how you use it, and in one case, on what you name it.

What is inside the package

Open a Magisk APK with any archive tool and you will see a familiar Android layout alongside some Magisk-specific pieces.

  • classes.dex and resources: the code and interface of the Magisk app itself.
  • lib/ folders for each processor architecture (arm64-v8a, armeabi-v7a, x86, x86_64): native binaries including magiskinit, magiskboot, the Magisk daemon and supporting libraries.
  • assets/: scripts such as boot_patch.sh and util_functions.sh, used when patching images and installing modules.
  • META-INF/: signing information for Android, plus an updater script that recovery environments look for when a zip is flashed.

That last folder is what makes the dual role possible. Android’s package installer ignores the updater script, while a custom recovery reads it and runs the installation logic. Nothing needs to be repackaged.

The three ways to use the same file

File nameHow you use itWhat happens
Magisk-v30.x.apkInstall on the phoneInstalls the Magisk app, which can patch images and manage root
Magisk-v30.x.zipFlash in a custom recoveryPatches the boot image directly from recovery
uninstall.zipFlash in a custom recoveryRemoves Magisk and restores the stock boot image

The renaming trick for uninstalling is documented in the official installation notes. The installer script checks its own file name, and when it finds the word uninstall, it switches to removal mode. It is a small detail, but it is extremely useful when a phone will not boot far enough to open the app.

For most current phones, no. The official guidance prefers patching the stock boot or init_boot image with the app and flashing it with fastboot. There are good reasons for that preference.

  • Custom recoveries are scarce on new devices. Many recent phones never receive a stable TWRP build, and those that do often lag behind Android releases.
  • A/B and virtual A/B devices complicate recovery. On many devices there is no separate recovery partition; recovery lives inside the boot image or vendor_boot, which makes flashing from recovery less straightforward.
  • Patching in the app is easier to verify. You can inspect the patched image, keep it, and flash it again if needed. A recovery install happens in one opaque step.
  • Encryption can block recovery access. If the recovery cannot decrypt data, copying the zip to internal storage becomes a puzzle of its own.

Recovery installation remains reasonable on older devices that already run a reliable custom recovery, especially those that predate init_boot. If you maintain an older phone with TWRP and a custom ROM, flashing the renamed Magisk zip is still quick and perfectly valid.

How to flash the Magisk zip in recovery

If your device falls into that category, the process is short.

  1. Download the official Magisk APK from the GitHub Releases page.
  2. Copy it to your phone or to an SD card or USB drive that recovery can read.
  3. Rename the extension from .apk to .zip. Some file managers hide extensions, so confirm the change actually took effect.
  4. Reboot to recovery, choose Install, select the zip and swipe to confirm.
  5. Read the log. A successful run reports that the boot image was patched and flashed.
  6. Reboot to system, then install the same file as an APK if the app is not already present.

If the log shows an error about an unsupported or unknown image format, stop there. That usually means the recovery or device layout is not suited to this method, and the app-based patch route will work better.

Recovery mode quirks on older hardware

Some older devices without a ramdisk in the boot image use a mode where Magisk is installed into the recovery partition instead. On those devices, the phone boots into Magisk by booting to recovery with a hardware key combination, and a normal boot starts the phone without root. The Magisk documentation explains this arrangement in detail because it surprises people: the device appears unrooted after a normal restart, when in fact everything worked. If your app’s home screen shows the Ramdisk line as No and you are on an older phone, read the recovery section of the official notes before you begin.

Common confusion around the Magisk zip

“The release page has no zip file”

Correct. The source code archives labelled zip and tar.gz are created automatically by GitHub for every release and contain the code, not an installer. Rename the APK instead.

“I installed the zip as an app and nothing happened”

Android will not install a file with a .zip extension. Rename it back to .apk and open it.

“My recovery says the signature verification failed”

Custom recoveries usually offer a zip signature verification toggle. Recovery verification uses a different scheme from Android’s app signing, so it can complain about a file that is perfectly genuine. Turning the check off for this flash is normal; just make sure the file came from the official repository first.

“Can I keep an old Magisk zip for emergencies?”

You can, but it is better to keep the stock boot image for your current firmware. That file restores a working, unrooted phone in every situation, regardless of which Magisk version caused the problem.

Modules are zips too

A separate point of confusion is the difference between the Magisk zip and module zips. Magisk modules are also distributed as zip archives, but they are installed from inside the Magisk app through the Modules tab, not flashed as the core installer. Some module authors still include recovery-flashable logic for compatibility, yet the supported route is installing from storage inside the app, which validates the module layout and runs its install script in the right environment.

A quick way to tell them apart: the core installer contains lib/ folders with Magisk binaries and a large classes.dex; a module contains a module.prop file at its root along with folders such as system/ or scripts like service.sh.

Choosing the right route for your device

A simple rule covers most cases. If your phone launched in the last few years and you can get its factory firmware, use the app to patch the boot or init_boot image and flash it with fastboot or Odin. If you are working with an older phone that already runs a dependable custom recovery and a custom ROM, renaming the APK to a Magisk zip and flashing it is a fine shortcut. In both cases, keep the stock image within reach and remember that the same file, renamed to uninstall.zip, can undo the change from recovery if something goes wrong.

Keeping your files organised

A little housekeeping saves a lot of stress later. Create a folder on your computer for each phone you root and keep four things in it: the official Magisk APK you used, the stock boot or init_boot image for your current build number, the patched image the app produced, and a short text note recording the date, firmware build and Magisk version. When an update arrives months later, you will know exactly which files belong together.

Name files clearly. boot_stock_TP1A.220905.004.img tells you far more than boot(1).img. The same goes for patched images: the app adds a random suffix, so rename the file to include the firmware build before copying it back to your computer. If you ever need to flash the Magisk zip from recovery on an older device, keep a renamed copy in the same folder rather than renaming your only APK back and forth.

Finally, never delete the stock image just because rooting succeeded. It is the one file that can return the phone to a clean, bootable state when every other option fails, and it costs only a few dozen megabytes of disk space.

Summary

  • The modern Magisk APK contains both the app and the flashable installer.
  • Rename it to .zip to flash in recovery, or to uninstall.zip to remove Magisk.
  • Patching an image with the app is the preferred method on current devices.
  • Source code archives on the release page are not installers.
  • Module zips are a different kind of package, installed from inside the app.