Skip to content

Magisk Root Installation Guide

Industry-standard systemless root solution for Android. Install Magisk to gain complete control over your device while maintaining system integrity.

Quick Navigation

Related Guides:


Understanding Magisk

Magisk is a systemless root solution that provides superuser access without modifying system partitions. It uses Magic Mount to overlay modifications, making root reversible and OTA-friendly.

Core Features

  • Magic Mount overlays: Virtualizes changes over read-only partitions (including EROFS on Android 13+)
  • Boot/init_boot patching: Modifies the boot chain (not /system)
  • Zygisk: Injects code into the Zygote process to enable powerful user-space modules
  • Reversible: Uninstall to fully restore stock images (if you kept originals)

Magisk vs Alternatives

FeatureMagiskKernelSUAPatch
Ease of UseExcellentModerateModerate
Module Support1000+300+50+
Root HidingGoodExcellentGood
Device SupportUniversalLimitedLimited
Custom Kernel RequiredNoYesNo

Choose Magisk if:

  • You want easiest installation
  • You need extensive modules
  • You want maximum compatibility
  • You're new to rooting

TIP

Detailed comaprison with other root solutions: Root Comparison


Prerequisites

Critical Requirements

ESSENTIAL PREREQUISITES

Unlocked Bootloader - Magisk requires unlocked bootloader. Complete bootloader unlocking first.

Stock Firmware - Download your device's stock firmware for boot image extraction.

Complete Backup - Backup all important data before proceeding.

Battery 50%+ - Ensure sufficient battery to prevent interruption.

Hardware Requirements

  • Android device with unlocked bootloader
  • 50% or higher battery charge
  • Quality USB cable (data-capable)
  • Computer (Windows, macOS, or Linux)

Software Requirements

On Computer:

On Device:

  • Latest Magisk APK from GitHub
  • File manager app
  • At least 500MB free storage

Compatibility Check

Android Version Support:

Android VersionMagisk SupportNotes
Android 15YesLatest Magisk required
Android 14YesFull support
Android 13YesMay require init_boot patching
Android 12YesZygisk fully supported
Android 11YesMature support
Android 6-10YesUse appropriate Magisk version

Check device compatibility:

  1. Verify bootloader is unlockable
  2. Confirm stock firmware availability
  3. Check XDA forums for device-specific notes

Installation Methods

Three installation methods available. Choose based on your device and comfort level.

Best for: Most users, all modern devices

This is the official and safest method.

Step 1: Download Required Files

Magisk APK:

  1. Visit Magisk GitHub Releases
  2. Download latest Magisk-vXX.X.apk
  3. Transfer to device

Stock Boot Image:

Determine correct partition:

  • Android 13+ (most devices): init_boot.img
  • Android 12 and older: boot.img
  • Check in Magisk app: Shows "Ramdisk: Yes/No"

Extract from firmware:

  • Google Pixel: Download factory image from Google
  • Samsung: Extract from AP file
  • Xiaomi: Extract from fastboot ROM
  • Other devices: Use payload-dumper-go for OTA files

Step 2: Patch Boot Image

  1. Install Magisk APK on device

    • Enable "Install Unknown Apps" for file manager
    • Install downloaded APK
  2. Transfer boot image to device

    • Copy boot.img or init_boot.img to Downloads folder
  3. Patch image in Magisk

    • Open Magisk app
    • Tap "Install" next to Magisk
    • Select "Select and Patch a File"
    • Choose your boot/init_boot image
    • Wait for patching to complete
    • Note output location (usually Download folder)

Output file named: magisk_patched_[random].img

Step 3: Flash Patched Image

Transfer to computer:

bash
adb pull /sdcard/Download/magisk_patched_xxxxx.img

Boot to fastboot:

bash
adb reboot bootloader

Verify fastboot connection:

bash
fastboot devices

Flash patched image:

For boot.img:

bash
fastboot flash boot magisk_patched_xxxxx.img

For init_boot.img (Android 13+):

bash
fastboot flash init_boot magisk_patched_xxxxx.img

Reboot device:

bash
fastboot reboot

Samsung (Odin devices):

  1. Copy the generated magisk_patched-xxxxx.tar to PC.
  2. Open Odin (Windows), load the patched TAR into AP.
  3. Untick “Auto Reboot”, start flash. When done, force reboot to recovery (Power + Vol Up while disconnecting USB) and factory reset if required (VaultKeeper behavior; first unlock already wiped data).
  1. First boot will be slower; open Magisk to finalize. KNOX is permanently tripped; Samsung Pay/Secure Folder may not work again.

Step 4: Verify Installation

  1. First boot may take 2-5 minutes
  2. Open Magisk app
  3. Should show:
    • Magisk: Installed (version number)
    • App: Latest (version number)

SUCCESS CHECK

If Magisk app shows version numbers for both Magisk and App, installation succeeded!


Method 2: Custom Recovery Installation (Legacy)

Best for: Older devices, recovery users

Note: Not officially supported on modern Android. Use Method 1 instead.

If you must use recovery:

  1. Patch boot image using Method 1
  2. Boot to custom recovery (TWRP/OrangeFox)
  3. Install > Install Image
  4. Select patched boot image
  5. Choose Boot partition
  6. Swipe to flash
  7. Reboot system

Method 3: Direct Installation (Advanced)

Best for: Switching from another root method, temporary root

Scenario A: Already Rooted

  1. Install Magisk APK
  2. Open Magisk app
  3. Tap Install > Direct Install
  4. Reboot

Scenario B: Temporary Boot Method

  1. Patch boot image (Method 1, Step 2)
  2. Boot patched image without flashing:
bash
fastboot boot magisk_patched_xxxxx.img
  1. Device boots with temporary root
  2. Open Magisk > Install > Direct Install
  3. Makes root permanent
  4. Reboot

Scenario C: Dump Current Boot Image

If stock firmware unavailable:

bash
adb shell su -c "dd if=/dev/block/by-name/boot of=/sdcard/boot.img"

Or for init_boot:

bash
adb shell su -c "dd if=/dev/block/by-name/init_boot of=/sdcard/init_boot.img"

Then proceed with Method 1 patching.


Post-Installation Setup

Initial Configuration

1. Verify Root Access

Test with root checker app or terminal:

bash
adb shell
su

Should grant root access.

2. Configure Magisk Settings

Open Magisk > Settings:

Magisk Tab:

  • Preserve force encryption: Depends on preference
  • Preserve AVB 2.0/dm-verity: Keep enabled
  • Recovery Mode: Enable if using custom recovery

App Tab:

  • Hide Magisk app: Recommended for banking apps
  • Restore images: Keep enabled
  • Grant root to shell: Enable for ADB root

Zygisk:

  • Enable Zygisk: Recommended (required for many modules)
  • Enforce DenyList: Enable for root hiding
  • Configure DenyList: Add apps that detect root

3. Security Settings

Configure superuser access:

  • Superuser access: Apps only
  • Multiuser mode: Owner only
  • Mount namespace mode: Isolated (recommended)
  • Automatic response: Prompt (recommended)
  • Request timeout: 10 seconds

Enable authentication:

  • Biometric authentication: Enable
  • Require authentication: Enable

Managing Modules

Installing Modules

Installation Process:

  1. Download module ZIP file
  2. Open Magisk app
  3. Tap Modules tab
  4. Tap "Install from storage"
  5. Select module ZIP
  6. Wait for installation
  7. Reboot when prompted

MODULE SAFETY

Only install modules from trusted sources. Malicious modules can damage your system.

Trusted Module Sources:

Managing Installed Modules

Enable/Disable Modules:

  • Tap module in list
  • Toggle switch
  • Reboot to apply

Remove Modules:

  • Tap module
  • Tap "Remove"
  • Reboot to apply

Module Issues:

If module causes bootloop:

  1. Boot to safe mode (power + volume down at boot)
  2. Open Magisk
  3. Disable problematic module
  4. Reboot

Or via recovery:

bash
rm -rf /data/adb/modules/[module_name]

Or via ADB:

bash
adb wait-for-device shell magisk --remove-modules

Root Hiding and Play Integrity

Understanding Play Integrity

Google Play Integrity replaced SafetyNet in 2024. Three levels exist:

LevelDescriptionRooted Devices
BasicBasic app integrityPassable with tricks
DeviceDevice integrity verifiedVery difficult
StrongHardware attestationNearly impossible

Reality for Rooted Devices:

  • Basic Integrity: Can pass with proper setup
  • Device Integrity: Extremely difficult, device-dependent
  • Strong Integrity: Impossible with unlocked bootloader

Configuring Root Hiding

Step 1: Hide Magisk App

  1. Magisk > Settings
  2. Tap "Hide the Magisk app"
  3. Enter custom name (e.g., "Settings")
  4. App repackages with new name and icon

Step 2: Enable DenyList

  1. Magisk > Settings
  2. Enable "Zygisk" (if not enabled)
  3. Enable "Enforce DenyList"
  4. Tap "Configure DenyList"

Step 3: Configure DenyList

Add these to DenyList:

  • Google Play Services (all sub-components)
  • Google Play Store
  • All banking/financial apps
  • Payment apps (Google Pay, etc.)
  • Apps that detect root
  • Games with anti-cheat

For each app:

  • Expand app entry
  • Check all sub-processes
  • Enable for all

Step 4: Clear App Data

After DenyList configuration:

  1. Settings > Apps
  2. Clear data for:
    • Google Play Services
    • Google Play Store
    • Banking apps
  3. Reboot device
  4. Reopen apps

Advanced Root Hiding

Install Shamiko Module:

  1. Download Shamiko from GitHub
  2. Install via Magisk
  3. Reboot
  4. DenyList items now hidden more effectively

Note: Shamiko works differently - don't enforce DenyList when using Shamiko.

TIP

Check our Root hiding section

Testing Play Integrity

Apps to Test:

  1. YASNAC - SafetyNet checker
  2. Play Integrity API Checker - Official checker
  3. TB Checker - Comprehensive checker

Updates and Maintenance

Updating Magisk

In-App Updates:

👉 Click to expand details
  1. Magisk > Settings
  2. Update channel: Stable (recommended)
  3. When update available:
    • Tap Install button
    • Choose "Direct Install"
    • Reboot when complete

Manual Updates:

  1. Download latest Magisk APK
  2. Install over existing app
  3. Open Magisk
  4. Tap Install > Direct Install
  5. Reboot

OTA System Updates

👉 Click to expand details

For A/B Devices (Most Modern Devices):

  1. Download OTA update (don't install yet)
  2. Wait for "Ready to install" notification
  3. Open Magisk
  4. Tap Install
  5. Select "Install to Inactive Slot (After OTA)"
  6. Wait for completion
  7. Reboot from system update
  8. Verify Magisk still installed

For Non-A/B Devices:

  1. Uninstall Magisk (Restore Images)
  2. Install OTA update
  3. Re-patch new boot image
  4. Flash patched image
  5. Reinstall modules

Backup and Restore

👉 Click to expand details

Backup Important Files:

  • Original boot/init_boot image
  • Magisk installation files
  • Module ZIPs
  • DenyList configuration (screenshot)

Restore to Stock:

  1. Magisk > Uninstall
  2. Select "Restore Images"
  3. Reboot
  4. Root removed, system restored

Or flash stock boot image:

bash
fastboot flash boot stock_boot.img

Troubleshooting

Installation Issues

Magisk Shows N/A After Installation

👉 Click to expand details

Causes:

  • Wrong partition flashed (boot vs init_boot)
  • Wrong image for device/Android version
  • Flashed to inactive slot on A/B device

Solutions:

  1. Verify correct partition for your device
  2. Re-patch with correct boot image
  3. Flash to currently active slot
  4. Check Magisk app for "Ramdisk" status

Device Bootloops After Flashing

👉 Click to expand details

Solutions:

  1. Boot to fastboot
  2. Flash stock boot image:
bash
fastboot flash boot stock_boot.img
fastboot reboot
  1. Verify correct image for your device
  2. Try different Magisk version

Fastboot Not Detecting Device

👉 Click to expand details

Solutions:

  • Reinstall USB drivers (Windows)
  • Try USB 2.0 port
  • Use different USB cable
  • Update Platform Tools
  • Try different computer

Root Access Issues

Apps Not Detecting Root

👉 Click to expand details

Solutions:

  1. Verify Magisk shows "Installed"
  2. Check superuser requests tab
  3. Grant root to shell: Magisk > Settings
  4. Test with root checker app
  5. Reinstall Magisk

Root Randomly Lost

👉 Click to expand details

Causes:

  • Module conflict
  • Magisk updated without direct install
  • System update overwrote boot

Solutions:

  1. Open Magisk > Install > Direct Install
  2. Remove recently installed modules
  3. Reboot device

Module Problems

Module Causes Bootloop

👉 Click to expand details

Solutions:

Via recovery:

  1. Boot to TWRP/custom recovery
  2. File Manager
  3. Navigate to /data/adb/modules/
  4. Delete problematic module folder
  5. Reboot

Via ADB:

bash
adb wait-for-device shell
magisk --remove-modules

Via safe mode:

  1. Force reboot: Hold power 10+ seconds
  2. Boot to safe mode at logo
  3. Open Magisk
  4. Disable module
  5. Reboot normally

Module Not Working

👉 Click to expand details

Solutions:

  1. Verify Zygisk enabled (if module requires it)
  2. Check module compatibility with Android version
  3. Reinstall module
  4. Check module logs: /data/adb/modules/[module]/
  5. Contact module developer

Banking App Issues

App Detects Root Despite DenyList

👉 Click to expand details

Solutions:

  1. Hide Magisk app with different name
  2. Clear app data completely
  3. Install Shamiko module
  4. Check if app requires Device/Strong integrity (may be impossible)

App Crashes on Launch

👉 Click to expand details

Solutions:

  1. Remove app from DenyList temporarily
  2. Clear app cache and data
  3. Reinstall app
  4. Check for app-specific Magisk modules
  5. Try older app version

Play Integrity Failures

👉 Click to expand details

Basic Integrity Fails

Solutions:

  1. Install Play Integrity Fix module
  2. Configure proper device fingerprint
  3. Clear Google Play Services data
  4. Reboot device
  5. Wait 24-48 hours for propagation

Device/Strong Integrity Fails

Reality: Nearly impossible to pass with:

  • Unlocked bootloader
  • Custom boot image
  • Hardware attestation

Some devices may pass Device with extensive workarounds, but no guarantees.


Best Practices

Security Recommendations

  1. Only grant root to trusted apps
  2. Review superuser logs regularly
  3. Keep Magisk updated
  4. Backup before major changes
  5. Test modules on non-critical device first

Module Management

  1. Install modules one at a time
  2. Test after each installation
  3. Keep list of installed modules
  4. Remove unused modules
  5. Update modules cautiously

Next Steps

After Installing Magisk:

  1. Install essential modules:

    • LSPosed Framework - App modifications
    • Ad blocking modules - System-wide ad blocking
    • Performance modules - Device optimization
  2. Explore root apps:

  3. Learn advanced features:


Community Resources

Official Resources:

Module Repositories:

Support Communities:

Getting Help

When asking for help, provide:

  • Device model and Android version
  • Magisk version installed
  • Installation method used
  • Exact error messages or behavior
  • Magisk log (Magisk > Save log)
  • Steps already tried