Doc: fastboot intro

From WebOS-Ports
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

A quick introduction to fastboot

fastboot is a small tool that comes with the Android SDK (software developer kit) that can be used to re-flash partitions on your device. It is an alternative to the recovery mode for doing installations and updates.

Because fastboot mode can start on your device even before Android loads (and can even run when Android isn't installed at all), fastboot mode is useful for updating the firmware quickly, without having to use a recovery mode. In fact, it's frequently the preferred way to initially install the recovery image on many devices. Fastboot can also be used for developer operations like unlocking the bootloader of Google's Nexus devices.

Not all devices support fastboot, but many do.

There are two "sides" to using fastboot-- the computer side and the device side. Typically your device first is connected to your computer via a USB cable. Then you boot to the "fastboot mode" on the device. On your computer, you then run the fastboot tool to issue commands. Please note that fastboot commands will ONLY work while the device is in fastboot mode.

Getting fastboot

See here for instructions on downloading the latest Android SDK, and thus fastboot, for your computer.

Helpful Tip

On some GNU/Linux distributions, like Debian Sid, you can install fastboot just with this command:

sudo apt-get install android-tools-fastboot

Or on Fedora, you can install android-tools package (which contains fastboot) with this command:

sudo yum install android-tools

Troubleshooting fastboot

"Command not found" errors

If the adb or fastboot binary file is installed on your computer, but you see a "command not found" type of error when entering your command into the terminal, the problem may be that the /platform-tools directory (or whichever directory contains the binary) is not in the "path of execution" for your terminal session. This means that your computer doesn't know where exactly the binary is located.

The solution to this is to add the directory containing the binary to your PATH.

Linux/OS X

On most Linux/OS X systems using the Bourne Again Shell (bash), you can do the following:

  1. Edit the "hidden" (starting with a period) file ~/.bashrc -- If your version of Linux supports the gedit editor, simply type gedit ~/.bashrc
  2. Next, add this line to the bottom: export PATH=${PATH}:<sdk>/tools:<sdk>/platform-tools (Change <sdk> to the actual path to the SDK's /platform-tools directory. For example: export PATH=${PATH}:/home/user/android-sdk-linux/platform-tools/)
  3. Save the file. Then open a new Terminal. The adb command should now be available.

Windows

On Windows systems you can do the following:

  1. Righ-click on My Computer and select Properties.
  2. Choose Advanced, and click on the Environment Variables button.
  3. Navigate to System Variables and double click on Path to edit.
  4. Enter the full path to your tools folder.

<waiting for device> errors

If you see <waiting for device> at any point when executing fastboot command, the PC is not configured to use fastboot properly. Most typically, this is because you are not running fastboot with elevated privileges. It may also be that you do not have the drivers correctly installed, which may happen under Windows 8 because of its insistence on signed drivers.

Linux/OSX

Run fastboot as root or with sudo.

Windows

Run fastboot as an Administrator.


Make sure the output of fastboot devices returns your device serial number or you will never get past this error message.