If your Android phone powers on but never reaches the home screen, keeps looping on the boot logo, or shows only a black screen, it’s likely soft‑bricked. Unlike a hard brick, the device still communicates with a computer, which means you can often revive it using the fastboot and adb command‑line tools. This tutorial walks you through the entire recovery process, from preparing your workstation to flashing a clean stock image and verifying that the phone boots normally again.
adb backup or copy files via adb pull. Once you flash a new system image, all user data will be erased.fastboot getvar product output (you’ll see it later). Using the wrong firmware can brick the device permanently.The official Android SDK Platform‑Tools package contains both adb and fastboot. Follow the OS‑specific instructions below.
C:\platform-tools.PATH:
setx PATH "%PATH%;C:\platform-tools"
You may need to open a new Command Prompt to see the change.brew install --cask android-platform-tools. This places the binaries in /usr/local/bin./usr/local/opt/platform-tools, then add it to PATH.
adb and fastboot in their repositories. For Ubuntu/Debian: sudo apt update && sudo apt install android-tools-adb android-tools-fastboot.platform-tools directory to PATH.
adb version and fastboot version. Both should print version numbers.Fastboot mode is a low‑level interface that works even when Android cannot start. The exact key combination varies by manufacturer, but the most common patterns are:
Volume Down + Power until the Fastboot screen appears.Volume Up + Bixby (or Power) + Volume Down → release when the warning appears and press Volume Up to enter Download mode, then use Odin instead of fastboot (outside the scope of this guide).Volume Up + Power.Once the device shows a text‑only screen with the word “Fastboot” and a list of commands, connect it to the PC via USB.
fastboot devices
The command should output a serial number, e.g., 0123456789ABCDEF fastboot. If nothing appears, try a different USB cable, a different port, or enable USB debugging (if the device still boots to recovery, you can enable it from the “Advanced” menu).
Most OEMs require an unlocked bootloader to flash a new system image. Unlocking will perform a factory reset, erasing all user data.
fastboot getvar unlocked
If the response is unlocked: yes, you can skip the unlocking step. If it says no or the command fails, continue.
YOUR_DEVICE with the serial shown by fastboot devices):
fastboot -s YOUR_DEVICE flashing unlock
On some devices (e.g., Pixel), you’ll see a confirmation screen on the phone. Use the volume keys to select “Yes” and confirm with the power button.motorola.com/unlock. The key is tied to the device’s serial number.Flashing an incorrect image will either fail or brick the device. Follow these guidelines:
Pixel 5 (GTT2), OnePlus 9 (LE2105)).boot.img, system.img, vendor.img, and a flash-all.sh (Linux/macOS) or flash-all.bat (Windows) script.Custom ROMs (LineageOS, Pixel Experience, etc.) are great for daily use, but they often require a custom recovery (TWRP) and a different flashing procedure. For a pure recovery, a stock image guarantees that the bootloader, radio, and security patches match the original configuration.
There are two common ways: run the supplied flash‑all script, or flash each partition manually. We’ll cover both.
chmod +x flash-all.sh
./flash-all.sh
On Windows, double‑click flash-all.bat or run it from Command Prompt.
bootloader, radio, system, vendor, etc. Watch the output – any line that says FAILED indicates a problem.# Example for a generic device – adjust filenames as needed
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash vendor vendor.img
# Some devices also need radio and bootloader images
fastboot flash radio radio.img
fastboot flash bootloader bootloader.img
# Finally, flash the recovery (optional)
fastboot flash recovery recovery.img
# Reboot
fastboot reboot
After each fastboot flash command, fastboot prints OKAY if the write succeeded. If you see FAIL, double‑check the filename and the device’s partition layout (use fastboot getvar all to list partitions).
Ctrl+C will leave the device in an incomplete state, often requiring a full re‑flash of the bootloader.fastboot devices
fastboot getvar all
Check the slot-count and current-slot values; some devices use A/B partitions. In that case, you may need to flash the system image to the inactive slot and then set it active:
fastboot set_active a # or b
fastboot reboot
adb logcat -d > bootlog.txt
Look for lines containing FATAL EXCEPTION or kernel panic. Often a mismatched vendor image causes this; re‑flash the correct vendor image.If you plan to keep the device for everyday use and don’t need to flash custom images, re‑locking the bootloader restores the security guarantees enforced by Google’s Verified Boot.
fastboot flashing lock
After locking, the device will perform a factory reset again. Verify that the lock succeeded:
fastboot getvar unlocked
The output should be unlocked: no.
| Symptom | Possible Cause | Fix |
|---|---|---|
| fastboot devices returns nothing | USB driver issue, bad cable, or phone not in fastboot mode. | Install OEM USB drivers (Google USB Driver for Pixel, OEM driver for Samsung, etc.). Try a different cable/port. Re‑enter fastboot mode. |
| fastboot flash … FAILED (remote: protocol fault) | Corrupted image file or mismatched partition size. | Re‑download the factory image, verify the checksum (MD5/SHA‑256). Use the --no-reboot flag to retry the same partition. |
| Device boots to recovery loop | Wrong vendor or radio image, or A/B slot mismatch. | Flash the correct vendor image. For A/B devices, ensure you flash to the inactive slot and then set it active. |
| Bootloader unlock command not recognized | Device’s bootloader is already locked and OEM does not allow unlocking. | Check manufacturer policy. Some Chinese brands (e.g., Huawei post‑2019) permanently lock the bootloader. |
| After flashing, the phone shows “Verification failed” | Fastboot version too old for the device’s protocol. | Download the latest Platform‑Tools (v33+). Older fastboot versions cannot communicate with newer bootloaders. |
fastboot devices.fastboot flashing unlock).flash-all script or manually flash each partition.If none of the troubleshooting steps restore the device, the problem may be hardware‑related (e.g., a failed eMMC, damaged bootloader chip, or broken USB port). In that case, contact the manufacturer’s service center or a qualified repair shop. Attempting hardware flashing (e.g., using a JTAG adapter) is beyond the scope of this guide and can void warranties.
By following this tutorial you should be able to bring most soft‑bricked Android phones back to life without rooting or installing custom ROMs. The key is preparation: the right firmware, a reliable USB connection, and patience while the device re‑writes its partitions.









