Fastboot commands are short instructions you type on a computer to control an Android phone while it is in fastboot (bootloader) mode, connected by USB. They let you check device details, reboot into different modes, unlock the bootloader and flash official image files. This guide lists the commands that matter, explains what each one does, and warns you before the ones that erase data.

What Is Fastboot?

Fastboot is a command-line tool from Google that comes in the free SDK Platform-Tools package, together with ADB. ADB talks to a phone while Android is running. Fastboot talks to the phone’s bootloader, before Android starts, which is why it can write whole partitions such as boot or vendor_boot.

Since Android 10, many phones also have fastbootd, a fastboot mode that runs in userspace (inside the recovery image). The bootloader still flashes low-level parts such as the bootloader, radio and boot images, while fastbootd flashes the “dynamic” partitions such as system and vendor.

Not every phone uses fastboot for flashing. Samsung Galaxy phones use Download mode and the Odin tool instead (see our Odin flashing guide).

Requirements

  • A Windows, macOS or Linux computer.
  • The latest SDK Platform-Tools from Google. The latest stable release at the time of writing is 37.0.1 (July 2026). Google says newer versions stay backward compatible with older phones, so always use the latest.
  • On Windows, a USB driver: the Google USB Driver for Pixel phones, or your phone maker’s driver for other brands (see Google’s OEM USB drivers list). macOS and Linux do not need a driver.
  • A good USB data cable.
  • A backup of your data before any unlock, flash or erase command.
  • To unlock the bootloader: OEM unlocking turned on in Developer options, if your phone allows it.

How to Set Up Fastboot and Enter Fastboot Mode

  1. Download SDK Platform-Tools for your operating system and extract the ZIP, for example to C:\platform-tools.
  2. Open a terminal in that folder. On Windows, open the folder, type cmd in the address bar and press Enter.
  3. Check that fastboot works:
    fastboot --version

    If you see a version number, the tool is ready.

  4. Put the phone in fastboot mode. If USB debugging is on, run:
    adb reboot bootloader

    Or use the buttons. On Pixel phones: switch the phone off, then press and hold Volume Down, then press and hold Power. Other brands use different key combinations.

  5. Check the connection:
    fastboot devices

    You should see a serial number followed by fastboot. If the list is empty, see the errors section below.

In Windows PowerShell, type .\fastboot instead of fastboot when you run it from the platform-tools folder.

Fastboot Commands List

Basic and information commands

These commands are safe. They only read information or reboot the phone.

Command What it does
fastboot devices Lists phones connected in fastboot mode. Add -l to show the USB path.
fastboot getvar all Shows all bootloader variables (product name, bootloader version, slot, lock state and more, depending on the phone).
fastboot getvar product Shows the product (device) name. Useful for checking you have the right firmware.
fastboot getvar version-bootloader Shows the bootloader version.
fastboot getvar current-slot Shows the active slot (a or b) on A/B phones.
fastboot getvar is-userspace Says yes in fastbootd and no in the bootloader.
fastboot reboot Restarts the phone normally into Android.
fastboot reboot bootloader Restarts back into the bootloader (same as fastboot reboot-bootloader).
fastboot reboot recovery Restarts into recovery mode.
fastboot reboot fastboot Restarts into fastbootd (userspace fastboot).
fastboot -s SERIAL command Sends the command to one phone when several are connected.
fastboot --help Shows every command your fastboot version supports.

Bootloader unlock and lock commands

Warning: Unlocking the bootloader performs a factory reset and deletes all user data, including photos and apps. An unlocked bootloader also makes the phone less secure. Back up first.

Command What it does
fastboot flashing get_unlock_ability Shows whether unlocking is allowed (1) or not (0). If it shows 0, turn on OEM unlocking in Developer options first.
fastboot flashing unlock Unlocks the bootloader. This is the standard command for Nexus and Pixel devices from 2015 onwards. You must confirm on the phone screen. Wipes all data.
fastboot flashing lock Locks the bootloader again and resets the phone. Wipes all data.
fastboot flashing unlock_critical Unlocks “critical” bootloader partitions. Google lists it only for specific cases, such as an older Pixel 2 XL bootloader.
fastboot oem unlock / fastboot oem lock Unlock and lock commands for older devices from before 2015.

Some brands add their own unlock process or do not allow unlocking at all. Follow your phone maker’s official instructions. For Xiaomi phones, see our Xiaomi bootloader unlock guide. Google recommends relocking the bootloader after you return a Pixel to an official factory image.

Flashing and wiping commands

Warning: Flashing the wrong image can stop the phone from booting. Use only official images built for your exact model. Commands marked “erases data” cannot be undone.

Command What it does
fastboot flash PARTITION FILE Writes an image file to a partition, for example fastboot flash boot boot.img.
fastboot update FILE.zip Flashes all partitions from an update ZIP package.
fastboot flashall Flashes all partitions from a folder set in ANDROID_PRODUCT_OUT. Mainly used by people who build Android from source.
-w (option) Wipes user data, for example fastboot -w update FILE.zip. Erases data.
fastboot erase PARTITION Erases a partition. Erasing userdata deletes your apps and files.
fastboot format PARTITION Formats a partition with a file system. Erases data.
fastboot boot FILE.img Loads a boot image into RAM and starts it once, without writing it to the phone.

For Pixel phones, the browser-based Android Flash Tool runs these steps for you and is easier than typing each command. See also our guide to flashing Pixel factory images.

A/B slot commands

Many newer phones keep two copies of key partitions, called slot a and slot b.

  • fastboot set_active a (or b): makes that slot the one the phone boots from.
  • --slot all (option): applies a flash command to both slots, for example fastboot --slot all flash boot boot.img.

fastbootd and advanced commands

  • fastboot reboot fastboot: enter fastbootd before flashing dynamic partitions such as system, vendor or product. The bootloader is designed to refuse these partitions.
  • create-logical-partition, delete-logical-partition, resize-logical-partition and wipe-super: change the dynamic partitions inside the super partition. These are developer tools. Do not use them on a working phone unless an official guide tells you to.
  • fastboot oem COMMAND: runs a maker-specific command. Each brand defines its own, so use only commands from your maker’s official documentation.

Common Fastboot Errors and Fixes

< waiting for any device >

Fastboot cannot see a phone. Check that the phone is really in fastboot mode, not just switched on. Try another cable and another USB port (Google suggests trying a USB-A port instead of USB-C). On Windows, open Device Manager: if the phone shows with a yellow warning sign, install the Google USB Driver or your maker’s driver, then try again.

‘fastboot’ is not recognized as an internal or external command

Windows cannot find the program. Open the terminal inside the platform-tools folder, or add that folder to your PATH. In PowerShell, use .\fastboot.

FAILED (remote: …)

The phone’s bootloader refused the command. The text after “remote” comes from the phone and differs by brand. Common causes are a locked bootloader, a wrong partition name, an image for a different model, or trying to flash a dynamic partition from the bootloader instead of fastbootd. Run fastboot getvar all to check the lock state and product name.

Commands fail on a new phone but worked before

Your fastboot version may be old. Download the latest SDK Platform-Tools and remove old copies from other folders so the new one is used.

Related Guides

FAQ

What is the difference between ADB and fastboot?

ADB works while Android is running and USB debugging is on. You use it to install apps, copy files or reboot the phone. Fastboot works only in bootloader or fastbootd mode and is used to unlock the bootloader and flash partitions. Both come in SDK Platform-Tools.

Do fastboot commands work on Samsung phones?

Samsung Galaxy phones do not use standard fastboot for flashing firmware. They use Download mode with Odin.

Which fastboot commands erase my data?

fastboot flashing unlock, fastboot flashing lock, the -w option, and erase or format on the userdata partition. Commands such as devices, getvar and reboot do not change your data.

How do I get out of fastboot mode?

Run fastboot reboot to start Android normally. If the phone is not connected to a computer, use the restart or start option in the phone’s bootloader menu.

Is fastboot safe to use?

Reading information and rebooting are safe. Unlocking, flashing and erasing are not risk-free: they can wipe the phone or stop it from booting if you use the wrong file. Use official images for your exact model and keep a backup.

https://droid-developers.com/wp-content/uploads/2026/11/fastboot-commands-list-featured-1024x538.jpghttps://droid-developers.com/wp-content/uploads/2026/11/fastboot-commands-list-featured-150x150.jpgFahim MahmudFlash ToolsHow ToFastboot commands are short instructions you type on a computer to control an Android phone while it is in fastboot (bootloader) mode, connected by USB. They let you check device details, reboot into different modes, unlock the bootloader and flash official image files. This guide lists the commands that...Android Help,Troubleshooting  & Stock Rom