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
- What is Magisk
- Prerequisites
- Installation Methods
- Post-Installation
- Module Management
- Root Hiding
- Troubleshooting
Related Guides:
- Main Rooting Guide - Complete rooting overview
- Bootloader Unlocking - Required first step
- Root Comparison - Compare with KernelSU and APatch
- Troubleshooting Guide
- FAQ - Common questions
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
Feature | Magisk | KernelSU | APatch |
---|---|---|---|
Ease of Use | Excellent | Moderate | Moderate |
Module Support | 1000+ | 300+ | 50+ |
Root Hiding | Good | Excellent | Good |
Device Support | Universal | Limited | Limited |
Custom Kernel Required | No | Yes | No |
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:
- Android Platform Tools (ADB/Fastboot)
- Device-specific USB drivers (Windows only)
- Stock firmware for your device
On Device:
- Latest Magisk APK from GitHub
- File manager app
- At least 500MB free storage
Compatibility Check
Android Version Support:
Android Version | Magisk Support | Notes |
---|---|---|
Android 15 | Yes | Latest Magisk required |
Android 14 | Yes | Full support |
Android 13 | Yes | May require init_boot patching |
Android 12 | Yes | Zygisk fully supported |
Android 11 | Yes | Mature support |
Android 6-10 | Yes | Use appropriate Magisk version |
Check device compatibility:
- Verify bootloader is unlockable
- Confirm stock firmware availability
- Check XDA forums for device-specific notes
Installation Methods
Three installation methods available. Choose based on your device and comfort level.
Method 1: Boot Image Patching (Recommended)
Best for: Most users, all modern devices
This is the official and safest method.
Step 1: Download Required Files
Magisk APK:
- Visit Magisk GitHub Releases
- Download latest
Magisk-vXX.X.apk
- 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
Install Magisk APK on device
- Enable "Install Unknown Apps" for file manager
- Install downloaded APK
Transfer boot image to device
- Copy boot.img or init_boot.img to Downloads folder
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:
adb pull /sdcard/Download/magisk_patched_xxxxx.img
Boot to fastboot:
adb reboot bootloader
Verify fastboot connection:
fastboot devices
Flash patched image:
For boot.img:
fastboot flash boot magisk_patched_xxxxx.img
For init_boot.img (Android 13+):
fastboot flash init_boot magisk_patched_xxxxx.img
Reboot device:
fastboot reboot
Samsung (Odin devices):
- Copy the generated magisk_patched-xxxxx.tar to PC.
- Open Odin (Windows), load the patched TAR into AP.
- 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).
- 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
- First boot may take 2-5 minutes
- Open Magisk app
- 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:
- Patch boot image using Method 1
- Boot to custom recovery (TWRP/OrangeFox)
- Install > Install Image
- Select patched boot image
- Choose Boot partition
- Swipe to flash
- Reboot system
Method 3: Direct Installation (Advanced)
Best for: Switching from another root method, temporary root
Scenario A: Already Rooted
- Install Magisk APK
- Open Magisk app
- Tap Install > Direct Install
- Reboot
Scenario B: Temporary Boot Method
- Patch boot image (Method 1, Step 2)
- Boot patched image without flashing:
fastboot boot magisk_patched_xxxxx.img
- Device boots with temporary root
- Open Magisk > Install > Direct Install
- Makes root permanent
- Reboot
Scenario C: Dump Current Boot Image
If stock firmware unavailable:
adb shell su -c "dd if=/dev/block/by-name/boot of=/sdcard/boot.img"
Or for init_boot:
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:
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:
- Download module ZIP file
- Open Magisk app
- Tap Modules tab
- Tap "Install from storage"
- Select module ZIP
- Wait for installation
- Reboot when prompted
MODULE SAFETY
Only install modules from trusted sources. Malicious modules can damage your system.
Trusted Module Sources:
- Official GitHub repositories
- Magisk Module Manager
- XDA Developers forums
- Known developers only
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:
- Boot to safe mode (power + volume down at boot)
- Open Magisk
- Disable problematic module
- Reboot
Or via recovery:
rm -rf /data/adb/modules/[module_name]
Or via ADB:
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:
Level | Description | Rooted Devices |
---|---|---|
Basic | Basic app integrity | Passable with tricks |
Device | Device integrity verified | Very difficult |
Strong | Hardware attestation | Nearly 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
- Magisk > Settings
- Tap "Hide the Magisk app"
- Enter custom name (e.g., "Settings")
- App repackages with new name and icon
Step 2: Enable DenyList
- Magisk > Settings
- Enable "Zygisk" (if not enabled)
- Enable "Enforce DenyList"
- 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:
- Settings > Apps
- Clear data for:
- Google Play Services
- Google Play Store
- Banking apps
- Reboot device
- Reopen apps
Advanced Root Hiding
Install Shamiko Module:
- Download Shamiko from GitHub
- Install via Magisk
- Reboot
- 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:
- YASNAC - SafetyNet checker
- Play Integrity API Checker - Official checker
- TB Checker - Comprehensive checker
Updates and Maintenance
Updating Magisk
In-App Updates:
👉 Click to expand details
- Magisk > Settings
- Update channel: Stable (recommended)
- When update available:
- Tap Install button
- Choose "Direct Install"
- Reboot when complete
Manual Updates:
- Download latest Magisk APK
- Install over existing app
- Open Magisk
- Tap Install > Direct Install
- Reboot
OTA System Updates
👉 Click to expand details
For A/B Devices (Most Modern Devices):
- Download OTA update (don't install yet)
- Wait for "Ready to install" notification
- Open Magisk
- Tap Install
- Select "Install to Inactive Slot (After OTA)"
- Wait for completion
- Reboot from system update
- Verify Magisk still installed
For Non-A/B Devices:
- Uninstall Magisk (Restore Images)
- Install OTA update
- Re-patch new boot image
- Flash patched image
- 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:
- Magisk > Uninstall
- Select "Restore Images"
- Reboot
- Root removed, system restored
Or flash stock boot image:
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:
- Verify correct partition for your device
- Re-patch with correct boot image
- Flash to currently active slot
- Check Magisk app for "Ramdisk" status
Device Bootloops After Flashing
👉 Click to expand details
Solutions:
- Boot to fastboot
- Flash stock boot image:
fastboot flash boot stock_boot.img
fastboot reboot
- Verify correct image for your device
- 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:
- Verify Magisk shows "Installed"
- Check superuser requests tab
- Grant root to shell: Magisk > Settings
- Test with root checker app
- Reinstall Magisk
Root Randomly Lost
👉 Click to expand details
Causes:
- Module conflict
- Magisk updated without direct install
- System update overwrote boot
Solutions:
- Open Magisk > Install > Direct Install
- Remove recently installed modules
- Reboot device
Module Problems
Module Causes Bootloop
👉 Click to expand details
Solutions:
Via recovery:
- Boot to TWRP/custom recovery
- File Manager
- Navigate to
/data/adb/modules/
- Delete problematic module folder
- Reboot
Via ADB:
adb wait-for-device shell
magisk --remove-modules
Via safe mode:
- Force reboot: Hold power 10+ seconds
- Boot to safe mode at logo
- Open Magisk
- Disable module
- Reboot normally
Module Not Working
👉 Click to expand details
Solutions:
- Verify Zygisk enabled (if module requires it)
- Check module compatibility with Android version
- Reinstall module
- Check module logs:
/data/adb/modules/[module]/
- Contact module developer
Banking App Issues
App Detects Root Despite DenyList
👉 Click to expand details
Solutions:
- Hide Magisk app with different name
- Clear app data completely
- Install Shamiko module
- Check if app requires Device/Strong integrity (may be impossible)
App Crashes on Launch
👉 Click to expand details
Solutions:
- Remove app from DenyList temporarily
- Clear app cache and data
- Reinstall app
- Check for app-specific Magisk modules
- Try older app version
Play Integrity Failures
👉 Click to expand details
Basic Integrity Fails
Solutions:
- Install Play Integrity Fix module
- Configure proper device fingerprint
- Clear Google Play Services data
- Reboot device
- 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
- Only grant root to trusted apps
- Review superuser logs regularly
- Keep Magisk updated
- Backup before major changes
- Test modules on non-critical device first
Module Management
- Install modules one at a time
- Test after each installation
- Keep list of installed modules
- Remove unused modules
- Update modules cautiously
Next Steps
After Installing Magisk:
Install essential modules:
- LSPosed Framework - App modifications
- Ad blocking modules - System-wide ad blocking
- Performance modules - Device optimization
Explore root apps:
- Root Apps Collection - Curated apps
Learn advanced features:
- Custom ROM Installation - Next level
- Ad Blocking Guide - Block all ads
- Debloating Guide - Remove bloat
Community Resources
Official Resources:
- Magisk GitHub - Source code and releases
- Magisk Documentation - Official docs
- XDA Magisk Forum - Community support
Module Repositories:
- Magisk Module Manager - Module collection
- Magisk Modules Repo - Official repo
Support Communities:
- Reddit r/Magisk - Community discussions
- Telegram Magisk - Official chat
- XDA Device Forums - Device-specific help
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