Fastboot Cheat Sheet

THIS IS NOT THE PAGE YOU ARE LOOKING FOR.

All my android content is now at http://andblogs.net/ including this page (http://andblogs.net/fastboot). The content below is out of date and unmaintained!

Just a quick list of some common tasks in fastboot. Please feel free to add more in the comments. I'll keep this up to date as I go.

Getting Started:
Getting FASTBOOT mode is the first and most important bit of advice. :) Simply boot with 'camera' held down and when you see the Androids on skateboards image (it will probably say "SERIAL0") plug in the usb and hit the 'back' button. It will think for a second and change to "FASTBOOT". Now it is ready for the commands! (I have had success doing this with usb plugged in the whole time, but others haven't. If you have trouble, try it w/ usb unplugged until you see the skateboards screen.)

Leaving FASTBOOT: To get out, either run fastboot reboot or, if you don't have the client, hit MENU+SEND+END all at once.

Building FASTBOOT client is the second important bit, but its just as easy (takes forever though.) It is bundled as part of the main Android sources so the easiest way is to just build the whole tree, and you'll find fastboot in out/host/{os}_{arch}/bin/fastboot.

General/Simple Tasks:
Flash all partitions: This looks for image files in the current directory, or in the appropriate out/target/* directory and it even reboots the phone automatically.

$ fastboot flashall

Flash a partition (its reported that it checks size, although I wouldn't count on it if I didn't have to):

$ fastboot flash {partition} {file.img}

Erase a partition (before flashing, or to blank it out):

$ fastboot erase {partition}

Flash a complete system: (untested). Create a zip with boot.img, system.img and recovery.img and run

fastboot update {update.zip}

Flash a new boot splash (replace the white "T-Mobile G1"):

fasboot flash splash1 mysplash.rgb565
Note that you need a properly formatted file for this - check out this article for info.

Partitions:
splash1: 300k (320x480x2), used for the "T-mobile G1" image. See here to customize it.
kernel: (size?) Holds boot.img (the kernel and initrd.) Do it the easy way, use fastboot flash:raw boot {kernel} {initrd}
recovery: (size?) Holds recovery.img (a kernel and initrd) used for rebuilding/updating the system.
system: 70 megs, holds the Android platform. Mounted read-only.
userdata: 76 megs, Holds all the user applications and data. Reset the phone to factory by erasing it. (Sometimes referred to as 'data')
cache: 70 megs, supposed to be temporary storage (/cache) but actually never used except by T-mobile OTA updates.

Scenarios:
Kernel development: (Suggested/used by swetland, a googler of highest cool.)

$ fastboot erase boot
$ fastboot erase recovery
Now your phone will stop at the color bars (or skateboard, in this case) every time. Bad for production, but good for development. To test a kernel, simply run
fastboot boot {kernel} {ramdisk}

Once you have a kernel/ramdisk you like, use

fastboot flash:raw boot {kernel} {ramdisk}
and it will save you a trip to mkbootimg. (It does it magically.)

The full usage doc:

usage: fastboot [ <option> ] <command>
 
commands:
  update <filename>                        reflash device from update.zip
  flashall                                 'flash boot' + 'flash 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

Trackback URL for this post:

http://www.gotontheinter.net/trackback/8

In malgrat de mar vind je de mooiste vakantie plekjes

De Spaanse Costa Brava is een ideale bestemming voor een heerlijke vakantie boordevol prachtige excursies. Geniet van zon, zee en strand maar laat u ook meenemen naar eeuwenoude Catalaanse dorpjes en het indrukwekkende Montserratgebergte