Recover an Android Boot Loop with ADB and Fastboot

11 min read Step‑by‑step guide to get a phone stuck in a boot loop working again using ADB, Fastboot and stock firmware, with safety warnings and troubleshooting tips. September 27, 2026 08:30 How to Recover an Android Boot Loop Using ADB and Fastboot

When an Android phone restarts over and over without reaching the lock screen, you’re dealing with a boot loop. The symptom is usually caused by a corrupted system partition, a failed OTA update, or a mismatched custom ROM. The good news is that, as long as the bootloader still accepts commands, you can break the loop using the standard Android debugging tools – adb and fastboot. This tutorial walks you through a safe, repeatable process that works on most manufacturers (Pixel, OnePlus, Samsung, etc.) while keeping data loss to a minimum.

Before you start

  • Charge the device to at least 50 %. Power‑related interruptions during flashing can brick the phone.
  • Install the latest Android Platform‑Tools on your computer (includes adb and fastboot).
  • Enable USB debugging on the phone (Settings > About phone > Tap Build number 7 times, then Settings > System > Developer options > USB debugging). If you cannot reach the OS, skip this step – you’ll use recovery mode instead.
  • Have a compatible stock firmware package ready. Most manufacturers host official images on their support sites; look for a ZIP or .tgz that matches your exact model and Android version.
  • Back up any data you can. If the OS boots even briefly, pull files via adb pull /sdcard/. If not, consider a fastboot oem unlock (which wipes everything) only as a last resort.
Note: Unlocking the bootloader will erase user data on most devices. Keep this in mind before proceeding.

Overview of the recovery workflow

  1. Confirm the device is reachable via adb or fastboot.
  2. Back up whatever you can (optional but recommended).
  3. Enter fastboot mode.
  4. Flash the stock system image (or a minimal recovery image) to break the loop.
  5. Reboot and verify the phone boots normally.
  6. Troubleshoot any remaining issues.

Step 1 – Verify ADB / Fastboot connectivity

Connect the phone to the PC with a good USB‑C cable. Open a terminal (Command Prompt, PowerShell, or a Linux shell) and run:

adb devices

If the output shows a device serial number with the word device, you can use ADB commands. If it shows unauthorized or nothing at all, try the following:

  • Re‑plug the cable and ensure the phone’s screen is unlocked enough to accept the USB‑debugging prompt.
  • On some devices, you must first boot into recovery and enable ADB in recovery (usually under Advanced > ADB).

If ADB still fails, you can skip directly to fastboot mode – most devices expose fastboot even when the OS is dead.

Step 2 – Optional data backup

Even a partial backup can save photos, documents, or app data. Use the following commands as needed:

# Pull the entire internal storage (may take a while)
adb pull /sdcard/ ~/AndroidBackup/

If the phone only boots into recovery, you can still use adb pull from there, provided the recovery image supports it (e.g., TWRP). If you cannot access adb at all, accept that data may be lost.

Step 3 – Boot into Fastboot mode

There are three common ways to reach fastboot:

  1. ADB command: adb reboot bootloader
  2. Hardware button combo: Power + Volume Down (most Pixel, OnePlus, Motorola). Hold both for ~5 seconds.
  3. Recovery menu: In recovery, choose Reboot > Bootloader.

When the screen shows a minimalist bootloader UI (often a gray or black screen with the device model), you’re ready.

Step 4 – Flash the stock firmware

The exact flashing commands differ by manufacturer. Below are two generic approaches that cover the majority of devices.

4A – Using a single‑image fastboot package (Pixel, Nexus, some OnePlus)

  1. Extract the downloaded stock package. You should see files like boot.img, system.img, vendor.img, etc.
  2. From the fastboot prompt, verify the connection:
    fastboot devices
  3. Flash each partition. The order usually matters – start with bootloader (if present), then radio, boot, system, and finally vendor.
    # Example sequence
    default_fastboot() {
      fastboot flash bootloader bootloader.img || exit 1
      fastboot reboot-bootloader
      fastboot flash radio radio.img || exit 1
      fastboot reboot-bootloader
      fastboot flash boot boot.img || exit 1
      fastboot flash system system.img || exit 1
      fastboot flash vendor vendor.img || exit 1
      fastboot erase userdata   # optional, clears corrupted user data
      fastboot reboot
    }
    
    default_fastboot
    Adjust the file names to match those in your package.
  4. Wait for each flash to finish. The fastboot tool will report OKAY if successful.

4B – Using a manufacturer‑specific flashing tool (Samsung, LG, Huawei)

Some OEMs do not expose raw images via fastboot. Instead, they provide a flashable ZIP that must be sideloaded from recovery:

  1. Boot into recovery (usually Power + Volume Up + Volume Down for Samsung, then choose Download mode).
  2. From the PC, run:
    adb sideload path/to/stock_update.zip
    The recovery will unpack and install the firmware.
  3. When the sideload completes, select Reboot system now.

If the device refuses to enter recovery, you may need to use the OEM’s desktop flashing utility (e.g., Odin for Samsung). Those tools are outside the scope of this tutorial but follow the same principle: flash the official stock image.

Step 5 – Verify the boot

After the flash finishes, the phone should reboot into the Android setup wizard. If you see the lock screen or home screen, the boot loop is resolved.

To double‑check that the system partitions are clean, you can run:

adb shell getprop ro.bootmode

It should return normal. You can also confirm the Android version matches the firmware you flashed:

adb shell getprop ro.build.version.release

Step 6 – Troubleshooting common failures

6A – Device not detected in fastboot

  • Make sure the USB driver for your device is installed (Google USB Driver for Windows, android-sdk/platform-tools for Linux/macOS).
  • Try a different USB cable or port.
  • Some devices require you to enable OEM unlocking in Developer options before they allow fastboot flashing. If you can’t access the OS, you may need to flash a temporary recovery that enables it.

6B – Fastboot reports FAILED (remote: ...)

  • Check that the image files match your exact model (e.g., pixel_4a vs pixel_4a_5g).
  • Older bootloaders sometimes reject images signed with newer keys. In that case, you need the exact firmware version that originally shipped with the device.

6C – The phone still boots into a loop after flashing

  • Boot into recovery and perform a factory reset / wipe data. This clears corrupted user data that can trigger a loop.
    fastboot erase userdata
  • If the loop persists, the problem may be hardware‑related (e.g., failing eMMC). At that point, professional repair is advisable.

Alternative approaches when fastboot is unavailable

Some OEMs lock the bootloader permanently (e.g., certain carrier‑branded Samsung models). In those cases you can try:

  • Recovery‑only flash: Use the stock recovery’s Apply update from ADB option and sideload the official OTA package.
  • OEM desktop tools: Samsung’s Odin, LG’s LG Flash Tool, or Huawei’s HiSuite. These utilities accept the same stock images but use a proprietary protocol.

Both methods still require the correct firmware for your exact model and region.

Final safety checklist

  • Backup everything you can before flashing.
  • Verify the firmware checksum (SHA‑256) against the manufacturer’s hash.
  • Keep the device charged and avoid interruptions.
  • Do not mix firmware from different Android versions or device variants.
  • After a successful recovery, consider enabling automatic system updates to avoid future loops.

By following this structured workflow, you can turn a frustrating boot loop into a clean, functional Android system without resorting to costly repairs. Remember that flashing always carries risk; proceed carefully, and when in doubt, consult the device’s official support channels.

User Comments (0)

Add Comment
We'll never share your email with anyone else.