Use Fastboot on a Mac, Windows or Linux computer to flash ROMs and recovery

SHARE THIS!Share on FacebookTweet about this on TwitterShare on RedditShare on StumbleUponPin on PinterestShare on LinkedIn

Fastboot is a diagnostic tool that is available on most Android devices—Samsung Galaxy phones and tablets are most notable exceptions—that you can boot into to access and modify system images over a USB connection to a computer.

Nexus devices, as well as those from HTC, Motorola and Sony all support fastboot.


If you regularly flash custom ROMs or carry out other mods and tweaks on your device then it is essential to understand how to use fastboot, since it is a vital tool for recovering from problems. Through fastboot you can flash a new ROM or radio, or re-flash a custom recovery so you can then restore a nandroid backup.

For this reason it is very difficult to brick a device that supports fastboot. So long as the phone shows some sign of life when you press the power button you should be able to connect it to your desktop computer and get it back working again using fastboot.

In this tutorial we’ll take a look at how you can set up fastboot, how to use it and some of the things you can do with it. For our guide we were using a Mac—the process is the same for Linux computers. On Windows the commands don’t have the ./ prefix required on the other platforms. You also need to install the Windows drivers for your phone or tablet before you connect it via USB. Drivers are not needed on Mac or Linux.

How to install fastboot

Download the Android SDK. There’s no need to install it on a Mac or Linux computer, so simply unzip the download and save the folder to a convenient location, such as on your desktop or in the Applications folder.


Open the folder, and then the platform-tools subfolder within it. Here you should see an icon labelled fastboot. This is what we’ll be using.

Also read:  The complete Android flashing guide: how to flash custom ROMs, OTA zips and factory images

Set up and use fastboot

Fastboot is not an application that runs within your OS, it requires the terminal or command line.

Open a terminal window—on a Mac you can do this from the desktop by going to Go > Utilities > Terminal.

Next you need to change the working directory to the folder which contains the fastboot software. Do this by typing the command cd followed by the full path to the platform-tools folder from your SDK download. We’ve unzipped the SDK to the desktop so our command would read cd /Users/[username]/Desktop/android-sdk-macosx/platform-tools/.

Your new working directory should now be shown in the terminal window.


Now power down your phone and boot it into fastboot mode. In most cases this will require you to hold the volume down key and power button simultaneously.

If you’re on Windows you’ll need to locate and install the drivers for your device before you connect it to your PC.

Connect your phone to your computer via a USB cable. Check that the computer can read the phone by typing fastboot devices on Windows or ./fastboot devices on Mac and Linux. After a brief moment the serial number for your device will be displayed. If the device isn’t be read it will tell you there are no devices connected and you should reattach it and try again.


You’re now ready to use fastboot.

Flash recovery via fastboot

To flash a custom recovery to your Android device you first need to download one.

You can download ClockworkMod recovery from here, or TWRP from here. Make sure you pick one that is compatible with your device.

If necessary unzip the download so that you are left with a .img file. The for ease of use move this .img file into the platform-tools folder.

Also read:  HTC One M9: so what exactly is new?

Now return to the terminal window and type the command ./fastboot flash recovery [filename.img]. Ensure there are no typos in what you have written, then hit Enter. The custom recovery will now be flashed to your device.


Flash a ROM via fastboot

Flashing a ROM is a similar process. Download one (making doubly sure it is compatible with your device) and move it into the platform-tools folders. Don’t unzip it this time.

If you want to wipe your device first—recommended for many ROMs, and often essential for recovering from problems—use the command ./fastboot -w.

To flash the ROM type ./fastboot update [rom].

Don’t interrupt the process until it has been completed. When it is done your phone should reboot. Alternatively type ./fastboot reboot to reboot, or ./fastboot reboot recovery to boot into recovery.


Other fastboot commands you need to know

There are many other things you can do with fastboot.

Unlock the bootloader

Use the command ./fastboot oem unlock (be warned that this will completely wipe your device) and ./fastboot oem lock to relock it again.

Erase system, data and cache

You can wipe various parts of the device with the commands:

./fastboot erase system
./fastboot erase data
./fastboot erase cache

Flash a kernel

To flash a kernel use the command ./fastboot flash boot [kernel filename.img].

Flash a radio

To flash a new radio use the command ./fastboot flash radio [radio filename.img].

It is well worth familiarising yourself with using fastboot as it can be a vital tool for recovering your phone if you ever brick it, and it is also useful for more advanced tweaks and mods as well. For example, installing the Android L preview direct from Google was something that initially needed to be done through fastboot (although flash able zips have since been produced to make the process even more straightforward).