How to Fix Bootloop After Rooting – Complete Rescue Guide (2026)

📌 Quick Summary: A bootloop after rooting is almost always caused by incompatible Magisk modules, incorrect boot image patching, or system file corruption. The good news? Most bootloops are recoverable without data loss if you act methodically. This guide provides a hierarchical rescue plan: start with Safe Mode or ADB commands to disable problematic modules, then use TWRP file manager for manual module removal, flash the Magisk Uninstaller as a last resort, or restore stock boot image via fastboot. For devices with custom recoveries, the /data/adb/modules directory is your lifeline. We also cover the critical "Recovery Mode" checkbox pitfall that causes bootloops on A-only devices, and introduce proactive tools like Yet Another Bootloop Protector to prevent future headaches.

You did it—you finally rooted your Android device. Then you installed that must-have Magisk module, rebooted with anticipation, and... nothing. Your phone is stuck in an endless cycle of restarting, never reaching the home screen. Welcome to the bootloop club. It's frustrating, but take a deep breath: this is almost always fixable.

A bootloop after rooting occurs when something during the boot process fails catastrophically, causing the system to restart repeatedly . The most common culprits are incompatible Magisk modules, incorrect boot image patching, or the notorious "Recovery Mode" checkbox mistake on A-only devices . In rare cases, it can be caused by corrupted system files or even hardware issues, but when it happens immediately after rooting, software is almost certainly the culprit .

This guide walks you through every recovery method, from the simplest (60-second fix) to the most comprehensive (full firmware reflash). We'll cover:

  • Immediate recovery: Safe Mode, ADB commands, and TWRP module deletion
  • The "Recovery Mode" checkbox trap that plagues A-only devices
  • Nuclear options: Magisk Uninstaller, stock boot image restore, and factory reset
  • Prevention: Bootloop protection modules and safe module practices

Let's get your device back to life.

Before You Begin: Identify Your Access Points

Your recovery options depend entirely on what you can still access. Check each of these in order:

Access Point How to Enter What You Can Do
Safe Mode During boot, press and hold Volume Down (varies by device) Disable third-party apps and some modules
Recovery Mode (Stock/TWRP) Power + Volume Up (common combo) Access file manager, wipe cache, factory reset
Fastboot/Bootloader Power + Volume Down Flash stock boot image, reflash firmware
ADB (while in recovery) Connect to PC with USB debugging enabled Run adb shell commands, disable modules

If you can't access any of these and your device won't even power off properly, try a forced hardware restart: press and hold the power button for 30+ seconds until the device shuts down completely . Then attempt to boot into recovery immediately.


Method 1: Safe Mode (Quickest Fix)

Many Android devices support Safe Mode, which boots with only essential system apps and disables all third-party modules . If your device boots into Safe Mode, you can uninstall the problematic module from within Magisk.

Steps to Enter Safe Mode:

  1. Press and hold the power button until the power menu appears.
  2. Tap and hold the "Restart" or "Power Off" option until you see a prompt asking to reboot into Safe Mode .
  3. Tap "OK" to confirm.
  4. If the device boots successfully, open the Magisk app and uninstall the last module you installed.
  5. Reboot normally.

Note: Safe Mode availability varies by manufacturer. Samsung devices typically support it; some Xiaomi devices may not .


Method 2: ADB Commands (No Recovery Needed)

If you have USB debugging enabled and your device is detected by your computer even during the bootloop, ADB can be a lifesaver. This method works without needing to boot fully .

Prerequisites:

  • USB debugging was enabled before the bootloop.
  • ADB and Fastboot installed on your computer.
  • Device connected via USB.

Step-by-Step ADB Module Disable:

  1. Open a command prompt/terminal in your platform-tools folder.
  2. Check if your device is detected:
    adb devices
    Your device should appear with a serial number (may show as "unauthorized" or "recovery").
  3. Run the magic command that disables all Magisk modules at once:
    adb shell magisk --remove-modules
    This command tells Magisk to disable every module and will automatically reboot your device .
  4. After reboot, your device should boot normally with all modules disabled.
  5. Open Magisk app and re-enable modules one by one to identify the culprit.

⚠️ Note: The magisk --remove-modules command works on Magisk v20.4+ and is the fastest way to recover from module-induced bootloops. It does not uninstall Magisk itself—only disables modules .


Method 3: TWRP Recovery – Manual Module Deletion

If you have TWRP or another custom recovery installed, you have direct filesystem access. This is the most reliable method for module-related bootloops .

📍 The Module Directory: /data/adb/modules/

All Magisk modules live in this directory. Each module has its own folder named after the module ID. Deleting the folder removes the module completely.

Step-by-Step TWRP Module Removal:

  1. Boot into TWRP recovery (usually Power + Volume Up).
  2. If TWRP asks for a password to decrypt data, enter your lock screen PIN/password.
  3. Go to Advanced → File Manager .
  4. Navigate to /data/adb/modules/.
  5. You'll see folders for each installed module. Identify the problematic one (sort by date if you remember when you installed it).
  6. Tap the folder and select "Delete" or "Remove".
  7. Go back to the main menu and select "Reboot → System".

Pro tip: If you're unsure which module caused the issue, you can rename folders instead of deleting them (add a .bak extension). This disables them but preserves the files in case you want to restore later.

Alternative: Flash Bootloop Protector in TWRP

The "Yet Another Bootloop Protector" module can be flashed directly in TWRP to automatically disable all modules if your data partition is accessible . This is useful if you can't identify the problematic module manually.


Method 4: The "Recovery Mode" Checkbox Trap (A-Only Devices)

This is a critical, often overlooked cause of bootloops on certain devices. If you have an A-only device with "Ramdisk: No" in Magisk (common on some Xiaomi models), a simple checkbox mistake can cause endless bootloops .

What Happens:

On these devices, Magisk can patch either the boot partition or the recovery partition. If the "Recovery Mode" option is checked during installation, Magisk patches the recovery ramdisk instead of boot. The device then tries to boot from the patched recovery, fails, and loops .

The Fix – Reflash TWRP and Correct the Setting:

  1. Boot into fastboot mode (Power + Volume Down).
  2. Flash TWRP again to restore proper recovery:
    fastboot flash recovery twrp.img
  3. Reboot directly into recovery using the key combo (don't let the system boot).
  4. Once in TWRP, your device should now boot normally (because the boot partition is untouched).
  5. Open Magisk app, go to Install, and uncheck the "Recovery Mode" box .
  6. Select "Direct Install" to properly patch the boot partition.
  7. Reboot. Your device should now boot with root intact.

As one Redmi Note 8 user explained: "Simply flashing /recovery (TWRP) using fastboot from PC should fix booting... After that, open Magisk App, go to Install, uncheck the Recovery Mode box and take Direct Install again" .


Method 5: Flash Magisk Uninstaller (Nuclear Option 1)

If module-specific fixes fail, you may need to completely remove Magisk to break the bootloop. The Magisk Uninstaller ZIP removes root and all modules, restoring the stock boot image .

Steps:

  1. Download the Magisk Uninstaller ZIP from the official Magisk GitHub repository.
  2. Transfer the ZIP to your device (if you can access storage) or use ADB push:
    adb push Magisk-uninstaller.zip /sdcard/
  3. Boot into TWRP recovery.
  4. Tap "Install" and select the Magisk Uninstaller ZIP.
  5. Swipe to confirm flash.
  6. Reboot. Your device should now boot without root.
  7. If you still want root, you can reinstall Magisk from scratch using the correct method for your device.

Method 6: Restore Stock Boot Image (Nuclear Option 2)

If Magisk itself is corrupted but you don't want to lose all data, restoring the stock boot image via fastboot can often resolve bootloops .

Steps:

  1. Obtain the stock boot.img for your exact device model and firmware version from your manufacturer's firmware package.
  2. Boot into fastboot mode (Power + Volume Down).
  3. Flash the stock boot image:
    fastboot flash boot boot.img
    (For Android 13+ devices with init_boot partition, you may need fastboot flash init_boot init_boot.img)
  4. Reboot:
    fastboot reboot

This removes root but preserves your app data. You can attempt to root again later with the correct method.


Method 7: Factory Reset (Last Resort – Data Loss)

If nothing else works, a factory reset may be necessary. This erases all user data but often resolves deep system corruption .

Via Recovery Mode:

  1. Boot into recovery (stock or TWRP).
  2. Select "Wipe data/factory reset" .
  3. Confirm the action.
  4. Reboot.

⚠️ Warning: This deletes all apps, photos, messages, and settings. Only use this after exhausting other options or if you have a recent backup.


Method 8: Flash Full Stock Firmware (Ultimate Solution)

If your device still won't boot—or if you can't access any recovery—flashing the complete stock firmware via manufacturer tools (Odin for Samsung, Mi Flash for Xiaomi, fastboot for Pixel) is the definitive fix . This restores every partition to factory state.

Brand-Specific Tools:

  • Samsung: Odin (download stock firmware and flash all 4 files: BL, AP, CP, CSC)
  • Xiaomi: Mi Flash Tool (use "Clean All" option)
  • Google Pixel: Fastboot with factory images (flash-all.bat)
  • OnePlus: MSM Download Tool (for Qualcomm devices)

This will wipe all data and return your device to out-of-box state .


Prevention: Avoiding Future Bootloops

Once you've recovered, take these steps to prevent future bootloops:

✅ Install a Bootloop Protection Module

Yet Another Bootloop Protector is a Magisk module that monitors your boot process and automatically disables problematic modules if a bootloop is detected .

How it works:

  • Creates "marker" files during boot attempts .
  • After three failed boot attempts, it disables all modules automatically .
  • Includes a SystemUI monitor that detects crashes and disables modules accordingly.
  • Allows whitelisting of known-good modules via /data/adb/YABP/allowed-modules.txt .

Installation: Flash the module ZIP in Magisk Manager before experimenting with new modules .

✅ Best Practices for Module Installation

  • Test modules one at a time – Never install multiple modules before rebooting .
  • Check compatibility – Verify the module supports your Android version and device.
  • Keep a Nandroid backup – TWRP backups are your ultimate safety net .
  • Read module comments – Check XDA or GitHub for known issues before installing.

Bootloop Recovery Decision Tree

START HERE

  • ↓ Can you boot into Safe Mode?
  •  ├── ✅ YES → Uninstall problematic module → Reboot
  •  └── ❌ NO → Continue ↓
  •   ↓ Is ADB working (adb devices shows device)?
  •   ├── ✅ YES → Run adb shell magisk --remove-modules → Reboot
  •   └── ❌ NO → Continue ↓
  •    ↓ Do you have TWRP/custom recovery?
  •    ├── ✅ YES → Navigate to /data/adb/modules/ → Delete problematic module folder → Reboot
  •    └── ❌ NO → Continue ↓
  •     ↓ Can you access fastboot mode?
  •     ├── ✅ YES → Flash stock boot image → Reboot
  •     └── ❌ NO → Continue ↓
  •      ↓ Last resort: Flash full stock firmware via manufacturer tool (wipes all data)

Frequently Asked Questions (FAQs)

1. Will fixing a bootloop delete my data?

It depends on the method. Safe Mode, ADB commands, and manual TWRP module deletion preserve your data. Flashing stock boot image via fastboot also preserves data. Factory reset and full firmware flashing will erase everything . Always try data-preserving methods first.

2. I can't access recovery or fastboot. Is my device bricked forever?

Not necessarily. Try a forced hardware restart by holding the power button for 30+ seconds. If that doesn't work, your device may be in a deep-brick state requiring EDL mode (Qualcomm) or BROM mode (MediaTek) recovery. This requires specialized tools and is beyond the scope of this guide—search XDA for your specific device's unbrick method.

3. What's the difference between "Recovery Mode" in Magisk and bootloop?

The "Recovery Mode" option in Magisk controls whether Magisk patches the boot partition or recovery partition. On devices with "Ramdisk: No" (A-only devices), checking this option incorrectly can cause bootloops because the device tries to boot from a patched recovery instead of boot . Always ensure this box is unchecked unless you specifically need recovery-based root.

4. Can a bad Magisk module cause hardware damage?

Extremely unlikely. Bootloops are software issues. However, a module that causes extreme overheating (by disabling thermal throttling) could potentially damage hardware if left running . If you suspect overheating, power off the device immediately and let it cool before attempting recovery.

5. My Samsung device is in a bootloop after rooting. Is Knox permanently damaged?

Knox is already tripped if you unlocked the bootloader—that's permanent and cannot be undone . However, the bootloop itself is fixable using the methods above. Samsung devices often require Odin to flash stock firmware for complete recovery.

6. How do I know which module caused the bootloop?

If you installed multiple modules before rebooting, the easiest method is to disable all modules at once using ADB or TWRP, then re-enable them one by one, rebooting between each, until you find the offender . Check module installation dates in TWRP's file manager to identify recent additions.

7. Will "Yet Another Bootloop Protector" work with KernelSU or APatch?

Yes. The module explicitly supports Magisk, KernelSU, and APatch . It detects bootloops regardless of the root method and disables modules accordingly.


Conclusion: Your Bootloop Recovery Checklist

A bootloop after rooting is scary, but it's almost never the end of your device. The key is to stay calm and work through the recovery options methodically, from least to most destructive.

Your recovery checklist:

  • Try Safe Mode – Quickest fix if available.
  • ADB commandadb shell magisk --remove-modules (if USB debugging was enabled).
  • TWRP file manager – Navigate to /data/adb/modules/ and delete the culprit.
  • Check "Recovery Mode" setting – If you have an A-only device, reflash TWRP and uncheck the box.
  • Flash Magisk Uninstaller – Removes root but preserves data.
  • Restore stock boot image – Via fastboot, preserves data.
  • Factory reset – Via recovery, wipes data but often fixes deep issues.
  • Flash full stock firmware – Ultimate solution, wipes everything.

Once you're back up and running, install Yet Another Bootloop Protector as insurance against future module experiments . And remember the golden rule of rooting: always test modules one at a time, and keep a full TWRP backup before major changes .

The Android rooting community has been dealing with bootloops for over a decade. The solutions are well-tested and documented. With this guide, you have everything you need to escape the loop and get back to enjoying your rooted device.


This article is for educational purposes only. The author and platform assume no responsibility for devices damaged, data lost, or warranties voided as a result of following these instructions. Always research your specific device model and root method before attempting modifications. The information presented here is current as of March 2026 and is based on community-verified knowledge; it may become outdated as new Android versions, security patches, and Magisk updates are released.

Your path out of a bootloop begins not with panic—but with the methodical elimination of variables, starting with the last thing you changed.

Post a Comment

[blogger][disqus][facebook]

Author

MKRdezign

MathJax

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget