|-w||Erase userdata and cache and format, if supported by the partition type.|
|-u||Do not first erase partition before formatting.|
|Specify device serial number or path to device port.|
|The device serial number can also be set by setting the environment variable ANDROID_SERIAL.|
|-l||Lists device paths. Works only with the command devices.|
|Specify the device product name.|
|Normally fastboot binary is built when building Android from the source using the Android Open Source Project (AOSP) repositories. Assuming $aosp is the root of the AOSP source code, the output binaries and images are stored in the $AOSP/out directory. fastboot binary lives in $AOSP/out/host/linux-x86/bin directory. If run from this directory, the images are looked for in ../../../target/product/$product directory where $product is specified with the -p switch.|
|If this switch is not set, the environment variable ANDROID_PRODUCT_OUT should be set to the directory containing the binary images.|
|This switch is generally specified with the flash and flashall commands.|
|Override linux kernel command line. This switch is typically used along with the command boot. See the EXAMPLES section for a typical usage.|
|Specify a custom USB Vendor ID for the device.|
|Specify a custom linux kernel base address.|
|Specify page size for the flash device. Default value is 2048.|
|Automatically sparse files greater than the specified size. Specify the size as 0 to disable sparse files.|
update filename Reflash the device from the give update file. The filename must be a zip file. flashall Reflash boot partition, recovery partition and the system partition. flash partition [filename] Write the given file to the specified partition. erase partition Erase a flash partition. format partition Format a flash partition. getvar variable Display a bootloader variable. boot kernel [ramdisk] Download and boot kernel. flash:raw boot kernel [ramdisk] Create boot image and flash it. devices List all connected devices. continue Continue with autoboot. reboot-bootloader Reboot device into bootloader. reboot Reboot the device normally.. help Show a help message.
This variable should be set to the root of the directory where the images for the specific product is stored. ANDROID_SERIAL Thie variable can be used to specify the device serial number.
1. Flashing the recovery image: fastboot flash recovery recovery.img
2. Flash the kernel and bootloader: fastboot flash boot boot.img
3. Erase a partition: fastboot erase cache
4. Reboot the phone: fastboot reboot
5. Boot with a custom built kernel and root filesystem (but not write them into the flash memory): fastboot boot linux-2.6/arch/arm/boot/zImage root-image/recovery.img-ramdisk.cpio.gz
6. Format partitions: fastboot format cache fastboot format userdata
7. Flash all partitions at once: fastboot -w flashall
8. Restoring from backed up images in the users computer:: fastboot erase system fastboot erase data fastboot erase cache and then flash the images (starting with system): fastboot flash system system.img fastboot flash data data.img fastboot flash cache cache.img
9. Boot the phone with a specific linux kernel commandline argument: fastboot -c "console=ttyHSL0,115200,n8" boot boot.img
Make sure that the device is connected and is visible via usbconfig. If the device is detected by usbconfig and adb devices output shows ???????????? device, then try restarting devd(8) or try disconnecting and connecting the cables.
The command name should have been chosen more carefully to reflect its purpose.
fastboot was written by engineers at Google for the Android project.
Ramakrishnan Muthukrishnan wrote this manual page, originally for the Debian Project, with a lot of suggestions from Raul Miller.
adb(1), devd.conf(5), devfs.rules(5), usbconfig(8)