What Is a Bootloop?

A bootloop occurs when your Android device repeatedly restarts without successfully completing the boot process — it gets stuck in an endless cycle on the boot animation or manufacturer logo screen. Bootloops are one of the most common issues faced after flashing a custom ROM, Magisk module, or firmware update. The good news: most bootloops are soft bricks, meaning they're fixable without specialized hardware.

Common Causes of Post-Flash Bootloops

  • Incompatible ROM or firmware — Flashing a ROM built for a different device variant or Android version
  • Dirty flash without a proper wipe — Switching between ROM families without wiping Dalvik/cache and data
  • Corrupt or incomplete download — A partially downloaded ROM ZIP that passed verification but has corrupt data
  • Wrong GApps package — Installing a GApps version incompatible with your ROM's Android version
  • Problematic Magisk module — A module that conflicts with your system or causes kernel panics at boot
  • Mismatched vendor/firmware — Flashing a ROM that requires a specific vendor partition that doesn't match your current firmware

Step 1: Determine How Deep the Bootloop Is

Before attempting any fix, identify at which stage the bootloop occurs:

  • Stuck at manufacturer logo (e.g., "Samsung," "MOTOROLA") — Likely a kernel or bootloader issue
  • Stuck at ROM boot animation — Usually a system or framework issue, often fixable with a cache wipe
  • Reaches Android setup but crashes — Often a GApps or data partition conflict

The earlier the bootloop occurs, the deeper and more serious the issue tends to be.

Step 2: Boot Into Recovery

Try booting into your custom recovery (TWRP or OrangeFox) using the hardware key combination for your device (usually Power + Volume Up). If you can reach recovery, you have many repair options available.

If you cannot reach recovery, try booting into Fastboot/Download mode to flash a recovery image directly from your PC.

Step 3: Wipe Cache and Dalvik Cache

This is the first and simplest fix to try. In TWRP:

  1. Go to Wipe → Advanced Wipe
  2. Select Dalvik / ART Cache and Cache
  3. Swipe to wipe, then reboot

This resolves a surprising number of bootloops caused by cached data conflicting with a newly flashed ROM.

Step 4: Disable a Problematic Magisk Module

If your bootloop started after installing a Magisk module, Magisk has a built-in safety mechanism. On boot, hold the Volume Down button — Magisk will disable all modules and allow the system to boot. Once booted, open the Magisk app and uninstall the problematic module.

Alternatively, connect via ADB in recovery and run:

adb shell
find /data/adb/modules -name disable -type f -delete

Step 5: Perform a Full Data Wipe and Reflash

If cache wipes don't resolve the issue, perform a full factory reset and reflash your ROM cleanly:

  1. In TWRP, go to Wipe and perform a Format Data (not just a factory reset — type "yes" to confirm).
  2. Wipe System, Dalvik, Cache, and if needed, Vendor.
  3. Re-flash the ROM ZIP from scratch.
  4. Flash a compatible GApps package if required.
  5. Flash Magisk after confirming the ROM boots successfully without it.

Step 6: Restore a NANDroid Backup

If you created a NANDroid backup before modifying your device (you should always do this!), restoring it is the fastest way to get back to a working state:

  1. In TWRP, go to Restore
  2. Select your backup from the list
  3. Choose the partitions to restore (Boot, System, Data)
  4. Swipe to restore and reboot

Step 7: Flash Stock Firmware (Last Resort)

If nothing else works, flashing the full stock firmware for your device will restore it to factory condition. Use the appropriate tool for your device — Fastboot for Google/Motorola, Odin for Samsung, SP Flash Tool for MediaTek.

Prevention: How to Avoid Bootloops in the Future

  • Always create a NANDroid backup before flashing anything
  • Verify ROM compatibility with your exact device model and firmware version
  • Always do a full wipe when switching ROM families
  • Verify the MD5/SHA checksum of downloaded ZIP files before flashing
  • Test ROM stability before adding Magisk modules

Bootloops are frustrating, but with the right approach, they're almost always recoverable. Stay calm, follow the steps methodically, and you'll be back up and running quickly.