How to Unbrick an Android Phone Using Fastboot and ADB – Complete Step‑by‑Step Guide

13 min read Recover a bricked Android device safely with Fastboot and ADB. Follow this detailed tutorial to restore stock firmware, unlock the bootloader, and troubleshoot common issues. September 30, 2026 04:30 How to Unbrick an Android Phone Using Fastboot and ADB – Complete Step‑by‑Step Guide

When an Android phone refuses to boot – stuck on the logo, looping in recovery, or showing a fastboot prompt – the device is often called “bricked”. Most users think the only solution is to send the phone to a service centre, but in many cases you can bring it back to life yourself using the fastboot and adb tools. This tutorial walks you through the entire process, from preparing your computer to flashing a clean stock image, while explaining why each step matters.

Before You Start

  • Backup data is impossible once the device is bricked. If you have important files, consider whether you can extract them via recovery mode before proceeding.
  • Make sure the phone’s battery is at least 50 % charged or keep it connected to a charger throughout the operation.
  • Use a reliable USB‑C/USB‑A cable – cheap cables often drop the connection during flashing.
  • Have a Windows, macOS, or Linux PC with administrator rights.
  • Download the official stock firmware for your exact device model (model number, carrier, Android version). Using the wrong image can brick the device further.
If you cannot access the device at all (no fastboot mode), you may need to seek professional repair. The steps below assume the phone can enter fastboot or download mode.

1. Install ADB and Fastboot on Your PC

ADB (Android Debug Bridge) and Fastboot are command‑line utilities that let you communicate with Android devices over USB. They are bundled in the Android SDK Platform‑Tools package.

  1. Download the latest Platform‑Tools zip for your OS.
  2. Extract the zip to a location you can easily access, e.g., C:\adb on Windows or ~/adb on macOS/Linux.
  3. Add the folder to your system PATH (optional but convenient). On Windows, open System Properties → Advanced → Environment Variables → Path → New, then paste the folder path.
  4. Open a terminal (Command Prompt, PowerShell, Terminal) and verify the installation:
    adb version
    fastboot version
    You should see version numbers without errors.
If the commands are not recognized, double‑check the PATH entry or run the executables directly from the extracted folder.

2. Put the Device into Fastboot Mode

The exact key combination varies by manufacturer. Below are the most common methods:

  • Pixel / Nexus: Power off, then hold Power + Volume Down until the fastboot screen appears.
  • Samsung (exynos): Power off, then hold Volume Down + Bixby + Power (or Volume Down + Power on newer models) and select Download mode, then press Volume Up to confirm.
  • OnePlus / Xiaomi / Oppo: Power off, then hold Power + Volume Up (or Volume Down for some models) until fastboot shows.

When the screen displays a text‑only interface with the Android robot and the word “FASTBOOT”, you are ready.

3. Verify Fastboot Connection

fastboot devices

If you see a device ID (e.g., 0123456789abcdef fastboot), the connection works. If the list is empty:

  • Check the USB cable and try a different USB port.
  • On Windows, install the appropriate Google USB driver or the OEM’s driver.
  • On macOS/Linux, you may need to add a udev rule (Linux) or grant permission (macOS).

4. Unlock the Bootloader (If Required)

Many devices ship with a locked bootloader, which prevents flashing any image other than the signed OTA. Unlocking wipes user data, so this step is a final “reset”. Not all manufacturers allow unlocking (e.g., some carrier‑locked Samsung devices). Check the OEM’s policy before proceeding.

  1. Enable OEM Unlocking in Developer Options (Settings → About phone → tap Build number 7 times → back to Settings → System → Developer options → toggle OEM unlocking).
  2. Reboot into fastboot again if you left the mode.
  3. Run the unlock command:
    fastboot flashing unlock
    The device will show a confirmation screen; use the volume keys to select “Yes” and confirm with the power button.
  4. After a reboot, the device will be in an unlocked state. You can now flash any image.
Unlocking the bootloader **erases all user data** and may void warranty on some devices. Proceed only if you accept the risk.

5. Download the Correct Stock Firmware

Stock firmware is a complete system image that restores the phone to the state it left the factory. Sources:

  • Manufacturer’s official website (e.g., Google Factory Images for Pixel, Samsung Firmware via SamMobile).
  • Trusted third‑party sites that host official images (e.g., XDA Developers).

Make sure to match:

  • Device codename (e.g., marlin for Pixel XL).
  • Region/carrier (e.g., US, EU, Verizon).
  • Android version (e.g., Android 12, Android 13).

After downloading, extract the zip. You should see a set of .img files (boot, system, vendor, etc.) and a flash-all.sh (Linux/macOS) or flash-all.bat (Windows) script.

6. Flash the Stock Images

There are two approaches: use the provided script (simplest) or flash each partition manually (more control). We cover both.

6.1 Using the Official Flash‑All Script

  1. Open a terminal in the extracted firmware folder.
    # Windows example
    cd C:\downloads\pixel_xl_factory_image
    
    # macOS/Linux example
    cd ~/Downloads/pixel_xl_factory_image
  2. Run the script with administrator rights.
    # Windows
    flash-all.bat
    
    # macOS/Linux (make script executable first)
    chmod +x flash-all.sh
    ./flash-all.sh
  3. The script will flash bootloader, radio, system, vendor, and other partitions in the correct order. Do not interrupt.
  4. When the process finishes, the device will reboot automatically into the fresh stock system.
If the script stops with an error like “device not found”, repeat step 3 to ensure fastboot still sees the phone.

6.2 Manual Partition Flashing (Advanced)

Manual flashing is useful when you need to skip a partition (e.g., keep a custom recovery) or when the script fails.

# Example for flashing system and boot only
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
# Add other partitions as needed
fastboot reboot

After each fastboot flash command, fastboot will report “OKAY”. If you see “FAIL”, note the error message – it often indicates a mismatched image or a locked partition.

7. Verify the Flash and Perform First‑Boot Checks

When the phone boots for the first time after flashing, it may take longer than usual (initializing apps, restoring defaults). Verify:

  • The Android setup wizard appears.
  • System settings show the correct Android version (Settings → About phone).
  • No error messages like “Bootloop” or “Missing system partition”.

If the device still refuses to boot, proceed to the troubleshooting section.

8. Troubleshooting Common Failures

8.1 Device Stuck in Fastboot Loop

  • Cause: Incomplete flashing or corrupted image.
  • Fix: Re‑run the flash‑all script. If it fails again, redownload the firmware and verify the checksum (usually provided as an .sha256 file).

8.2 “Unauthorized” or “Device not found” Errors

  • Cause: USB driver issue or missing permission.
  • Fix: On Windows, reinstall the Google USB driver via the SDK Manager. On Linux, add a udev rule:
    # /etc/udev/rules.d/51-android.rules
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
    
    Then run sudo udevadm control --reload-rules && sudo udevadm trigger.

8.3 Bootloader Refuses to Unlock

  • Cause: OEM has disabled unlocking for that device (e.g., carrier‑locked Samsung).
  • Work‑around: Search for an OEM‑specific unlocking tool (e.g., sam-unlock for some Samsung models) or consider using Download mode with Odin (Samsung) to flash stock firmware without unlocking.

8.4 “Failed to write image” Errors

  • Cause: Partition size mismatch (trying to flash a larger image on a smaller partition).
  • Fix: Ensure you have the exact firmware for your exact model. Do not mix Pixel images with Pixel XL images.

8.5 Persistent Bootloop After Flash

  • Cause: Corrupted userdata partition or leftover custom recovery.
  • Fix: Wipe userdata and cache before flashing:
    fastboot erase userdata
    fastboot erase cache
    fastboot reboot
    Then re‑run the flash‑all script.

9. Optional: Re‑Lock the Bootloader

If you unlocked the bootloader solely to flash stock firmware, you can re‑lock it to restore the original security posture.

fastboot flashing lock

The device will wipe user data again, then reboot. After re‑locking, the phone behaves like a fresh out‑of‑the‑box device.

Re‑locking a bootloader that still runs a custom ROM can brick the device. Only re‑lock after confirming you are running the official stock image.

10. Post‑Recovery Checklist

  • Run Settings → System → Advanced → Reset options → Reset Wi‑Fi, mobile & Bluetooth to clear any leftover network configs.
  • Check for system updates (Settings → System → System update) and apply any available patches.
  • If you use Google Backup, sign in and let the device restore your apps and data.
  • Run a quick battery health check: open Settings → Battery → Battery usage and verify no abnormal drain.

11. When to Seek Professional Help

If you have tried the steps above and the device still does not enter fastboot, shows hardware error codes, or the screen remains black, the problem may be hardware‑related (e.g., faulty eMMC, damaged boot ROM). At that point, a qualified repair shop is the safest option.

Summary

Unbricking an Android phone with Fastboot and ADB is a systematic process: prepare the PC, get the correct stock firmware, unlock the bootloader (if needed), flash the partitions, and verify the result. By understanding why each command is required, you reduce the risk of further damage and gain confidence to troubleshoot future software issues. Keep the backup of stock images for your device – they are the most reliable safety net when something goes wrong.

User Comments (0)

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