Android: Fastboot setup

From Compulab Mediawiki
Revision as of 08:55, 21 September 2015 by Andreyg (talk | contribs) (Forcing fastboot mode)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Overview

Fastboot is a protocol and associated utility, used primarily to modify flash file system while the device is running a bootloader. Fastboot operates via USB OTG. In addition to the bootloader implementing the fastboot protocol, fastboot client utility must be installed on user's workstation.

Getting Fastboot

In general fastboot utility is provided within the Android SDK. Also some Linux disributions provide fastboot within their package repositories. For example, on Ubuntu platform, fastboot may be obtained via android-tools-fastboot package.

Useful commands

  • List connected devices
    $ fastboot devices
  • Reboot device
    $ fastboot reboot
  • Flash image file onto partition identified by its name, e.g. boot
    $ fastboot flash boot boot.img
  • Boot device, loading boot.img from the PC workstation, instead of boot partition
    $ fastboot boot boot.img

Forcing fastboot mode

Normally a bootloader will proceed to booting a valid boot partition. In case there is none, the bootloader will fall back into fastboot mode.
There are a few options to force fastboot mode despite valid boot partition:

  • By rebooting to fastboot mode. Issue on either workstation
    $ adb reboot bootloader
    or Android device itself
    # reboot bootloader
  • By powering up while pressing the boot select button.
  • By invalidating boot partition. Destroy boot partition signature, issuing on the device (in either Linux or Android command line):
    # dd if=/dev/zero of=/path/to/boot/partition bs=1 count=1
Admolition note.png path-to-boot-partition may be, e.g, /dev/block/platform/msm_sdcc.1/by-name/boot

See Also