6

Where can I find the documentation for fastboot in Android SDK's platform-tools?

I know that running fastboot on its own gives a quick help for the different commands, but I'd like to know about details such as:

  • update: What does update.zip need to look like
  • flashall: Where do the flash boot + recovery + system come from, what format, etc.
  • boot: What is the format of <kernel> and what is the <ramdisk> option
  • flash:raw boot: What is the difference to boot and what is it used for

I am surprised that in the Android Developer's Tools Help there is documentation for adb but not fastboot.

  • Any progress here? I'm wondering about flash:raw, too. – Michael Hoffmann Dec 25 '15 at 23:48
3

Fastboot commandline utilisation as per eLinux.org is shown below.

$ fastboot -h
usage: fastboot [ <option> ] <command>

commands:
  update <filename>                        reflash device from update.zip
  flashall                                 flash boot + recovery + system
  flash <partition> [ <filename> ]         write a file to a flash partition
  erase <partition>                        erase a flash partition
  getvar <variable>                        display a bootloader variable
  boot <kernel> [ <ramdisk> ]              download and boot kernel
  flash:raw boot <kernel> [ <ramdisk> ]    create bootimage and flash it
  devices                                  list all connected devices
  reboot                                   reboot device normally
  reboot-bootloader                        reboot device into bootloader

options:
  -w                                       erase userdata and cache
  -s <serial number>                       specify device serial number
  -p <product>                             specify product name
  -c <cmdline>                             override kernel commandline
  -i <vendor id>                           specify a custom USB vendor id

update: What does update.zip need to look like

In general, fastboot flashes only .img files.

The update.zip generally consists of .img files which will be flashed to the particular partition. A typical update.zip file to flash via fastboot will have following files and more

boot.img
recovery.img
system.img
userdata.img
radio.img
etc...

flashall: Where do the flash boot + recovery + system come from, what format, etc.

flashall will flash the system.img, boot.img & recovery.img in the current/PATH folder. These images can be obtained from the update.zip mentioned above.

boot: What is the format of <kernel> and what is the <ramdisk> option

In fastboot boot, the <kernel> format is an .img file. I am not sure of the <ramdisk> option. My guess would be to boot a kernel with a modified ramdisk without altering the built kernel (I am not a developer, sorry).

This is what I have learnt fiddling with Nexus phones. Others can correct any obvious errors in the write up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.