Soft‑bricking occurs when the operating system fails to boot, usually showing a boot loop, a black screen, or the Android logo that never progresses. Unlike a hard brick, the device still powers on and can communicate with a computer via fastboot or adb. This tutorial walks you through a safe, repeatable process to restore the original firmware without rooting the device.
Why this works: Fastboot talks directly to the bootloader, which runs before Android is loaded. By flashing the stock partitions (boot, system, vendor, etc.) you replace the corrupted software with a known‑good image supplied by the device manufacturer.
.zip or .tar containing fastboot images). Manufacturer websites, XDA‑Developers, or trusted firmware archives are typical sources.Warning: Flashing the wrong firmware will turn a soft brick into a hard brick. Double‑check the model number, region code, and Android version before proceeding.
platform-tools zip for your OS from the official Android developer site.C:\adb on Windows or ~/adb on macOS/Linux.PATH so you can run adb and fastboot from any terminal.
export PATH=$PATH:/path/to/platform-tools to your ~/.bashrc or ~/.zshrc and run source ~/.bashrc.fastboot --version. You should see the version number without errors.Pixel_5a_2022_09_01.zip) and the Android version..zip, extract it with any archive tool. Inside you will find a collection of .img files such as boot.img, system.img, vendor.img, and sometimes radio.img.stock_firmware) and copy all extracted .img files there. This keeps the flashing command tidy.If the device still boots enough to display the Android UI, enable the following before entering fastboot mode. This is optional for fastboot, but it ensures adb can be used for a quick sanity check.
fastboot devices. You should see a device ID like 0123456789ABCDEF fastboot. If nothing appears, try a different USB port, a different cable, or enable “USB debugging” again.Most manufacturers lock the bootloader to prevent unauthorized flashing. Unlocking is a prerequisite for flashing most stock images. The process varies by OEM, but the generic fastboot command works on many devices.
fastboot flashing get_unlock_ability. If the output says 0, the bootloader cannot be unlocked on that device (common on some carrier‑locked phones). In that case, you must use the OEM’s official unlocking tool or contact support.1, run fastboot flashing unlock. The device will display a warning screen; use the volume keys to confirm and the power button to proceed.Some OEMs (e.g., Xiaomi, OnePlus) require you to register an unlock code on their website before the command works. Check the manufacturer’s developer portal if the generic command fails.
Even a soft‑bricked device may still have readable partitions. Backing them up gives you a safety net if the flashing process goes wrong.
backup_fastboot.fastboot flash --download-only boot boot.img
fastboot flash --download-only system system.img
fastboot flash --download-only vendor vendor.img
# Add other partitions as needed, e.g., radio, vbmeta
This copies the images from the phone to the PC without overwriting anything on the device.backup_fastboot. Store them on an external drive before proceeding.Now you will replace the corrupted partitions with the clean ones you extracted earlier.
.img files.
cd /path/to/stock_firmware
fastboot flash boot boot.img
fastboot flash vendor vendor.img
fastboot flash system system.img
# If a radio image is present, flash it next
fastboot flash radio radio.img
# Finally flash the vbmeta (verified boot) image if it exists
fastboot flash vbmeta vbmeta.img
OKAY. If you see FAILED, note the error message – common causes are mismatched partition sizes or a locked bootloader.fastboot reboot to restart the device.
Some devices require a special command after flashing, such as fastboot flashing lock to re‑lock the bootloader, or fastboot oem lock. Check the OEM’s flashing guide for any post‑flash steps.
If everything went well, the phone will boot into the stock Android setup wizard. You should see the usual welcome screens, not a boot loop.
Keeping the bootloader unlocked leaves a small attack surface. If you do not plan to flash custom ROMs, re‑locking is advisable.
fastboot flashing lockfastboot oem lock.img files match the device’s partition layout. Flashing a system image meant for a different region (e.g., EU vs. US) often fails.size mismatch, the firmware is for a different hardware revision. Download the correct variant.FAILED (remote: locked bootloader) if you skip Step 5.vbmeta image. A corrupted verified‑boot metadata can prevent the OS from loading.dtbo.img (device tree overlay). If your firmware package includes it, flash it with fastboot flash dtbo dtbo.img before the system image.boot.img didn’t flash correctly. Re‑flash boot.img alone:
fastboot flash boot boot.img
Some devices (notably many Samsung models) expose a recovery mode that can accept an OTA package via ADB sideload. This method works when the bootloader is locked but the recovery is still functional.
adb sideload path/to/ota_package.zip
The PC will stream the zip to the device; progress is shown on both sides.If you encounter any of the following, stop and consider a repair service:
device locked and you cannot obtain an unlock code from the OEM.FAILED (remote: flash write error) repeatedly).Recovering a soft‑bricked Android phone with Fastboot and ADB is a systematic process: install platform‑tools, obtain the exact stock firmware, unlock the bootloader (if needed), flash the required images, and verify the boot. By following the steps above, you can bring a non‑booting device back to life without rooting or third‑party tools. Remember to back up before flashing, double‑check firmware compatibility, and keep your device charged throughout the operation.









