๐Ÿ“ฑ Flashing Guides

Fastboot ADB Flash Guide

Difficulty: ๐Ÿ”ด Advanced
Read time: 26 min
Updated: May 13, 2026
High Risk โ€” backup first!
๐ŸชŸ Windows ๐ŸŽ macOS ๐Ÿง Linux

Pre-Flight Checklist

Complete ALL items before proceeding. Skipping any step increases the risk of bricking your device.

Requirements met 0 / 7

Guide Steps

Guide Progress
0/5 steps

Download Android Platform Tools from Google and extract to a folder. Open a Command Prompt (Windows) or Terminal (Mac/Linux) in that folder and test:

adb --version fastboot --version

Both commands should return a version number. If you get "command not found", add the Platform Tools folder to your system PATH environment variable.

If your bootloader is not already unlocked:

  1. Enable Developer Options: Settings โ†’ About Phone โ†’ tap Build Number 7 times
  2. Go to Settings โ†’ Developer Options โ†’ enable OEM Unlocking
  3. Connect device to PC, open terminal:
adb reboot bootloader

Once in bootloader/fastboot mode:

fastboot flashing unlock

Confirm the unlock on your device screen using the volume keys and power button. This will factory reset your device.

๐Ÿšซ Unlocking the bootloader voids your warranty on most devices and permanently trips the Knox counter on Samsung devices.

Method 1 โ€” via ADB (recommended, device must be on):

adb reboot bootloader

Method 2 โ€” via hardware buttons (device must be OFF):

  • Google Pixel: Power + Volume Down
  • OnePlus: Power + Volume Up
  • Xiaomi/Redmi: Power + Volume Down
  • Motorola: Power + Volume Down

Verify your PC recognizes the device in fastboot mode:

fastboot devices

You should see your device serial number. If nothing shows, reinstall drivers.

Option A: Flash a single .img file

fastboot flash boot boot.img fastboot flash recovery recovery.img fastboot flash system system.img

Option B: Flash Google Pixel factory image (full wipe)

Extract the factory image ZIP. Inside you'll find a flash-all.sh (Mac/Linux) or flash-all.bat (Windows). Run it:

# Windows: flash-all.bat # Mac/Linux: ./flash-all.sh

Option C: Wipe data partition manually

fastboot erase userdata fastboot erase cache
โš ๏ธ Erasing userdata is IRREVERSIBLE. All your files, apps, and settings will be permanently deleted.

After flashing, reboot:

fastboot reboot

Or to reboot into recovery:

fastboot reboot recovery

The first boot will take several minutes. Do not panic if it takes up to 10 minutes โ€” Android is optimizing apps.

๐Ÿ’ก After unlocking the bootloader, you may see a warning screen on every boot ("your device is unlocked"). This is normal and can't be removed without re-locking the bootloader.

Troubleshooting & FAQ

Common errors and their solutions. Read this before asking for help.

Most common causes:

  1. Wrong driver โ€” install Google USB Driver or your device's specific ADB driver
  2. Device isn't actually in fastboot mode โ€” verify screen shows "Fastboot Mode" or "Bootloader"
  3. Bad USB cable โ€” try the original cable
  4. On Windows: run Command Prompt as Administrator

This means fastboot is connected but doesn't recognize the command. Possible causes:

  • You're not actually in fastboot mode (you might be in recovery or ADB mode instead)
  • Using an older fastboot version โ€” update Android Platform Tools
  • The partition name is wrong for your device (e.g., some use "boot_a" and "boot_b" for A/B partition schemes)

Modern devices (Pixel 2+, most flagships 2019+) use A/B partition scheme. To flash both slots:

fastboot flash --slot=all boot boot.img

Or use:

fastboot flash boot_a boot.img fastboot flash boot_b boot.img

The factory image flash-all script handles this automatically.

Yes, on most devices:

fastboot flashing lock

However, you must flash official stock firmware before re-locking. Re-locking with custom software will hard brick your device. The device will factory reset again on lock.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.