Fastboot

From Android Wiki

(Difference between revisions)
Jump to: navigation, searcha
(Fastboot prerequisites: Clarify -- not everyone needs this.)
m (fhtagn)
Line 1: Line 1:
-
==Fastboot==
+
fhtagn
-
Fastboot is protocol used to update the flash filesystem in Android devices from a host over USB.  It allows flashing of unsigned partition images.  It is disabled in the production G1 devices since USB support is disabled in the
+
-
bootloader[http://groups.google.com/group/android-porting/browse_thread/thread/4990ffe551844860].  This can be changed if you get root on the device.  See also [http://www.telesphoreo.org/pipermail/g1-hackers/2008-December/000156.html]
+
-
 
+
-
==Fastboot prerequisites==
+
-
To be able to use fastboot, you need to be running either an ADP1 or the [[Engineering Bootloader]] on your G1.
+
-
 
+
-
If you are developing on a linux host, you may need to tweak UDEV to recognize the phone in fastboot mode.  You may already have done this to get the phone recognized in Eclipse, but you need to do it again for fastboot, since fastboot uses a different device ID: 0bb4:0c01.  The warning sign is that fastboot says "< waiting for device >" forever, even when you have the "FASTBOOT" message on the phone; if this happens, try adding the device ID 0bb4:0c01 to your UDEV configuration for Android.
+
-
 
+
-
For Opensuse 11.1, the following config file, in /etc/udev/rules.d/11-android.rules, seems to work:
+
-
 
+
-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c01", MODE="0666", OWNER="mylogname"
+
-
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0bb4", ATTRS{idProduct}=="0c02", MODE="0666", OWNER="mylogname"
+
-
 
+
-
NOTE: change "mylogname" to your Linux login ID.
+
-
 
+
-
==Starting Fastboot==
+
-
To start fastboot, first get to the bootloader: turn off your phone and hold down the "camera" button while powering it back on. You will see a white screen with skateboarding bugdroids. If you just see the normal multicolored bootloader screen, you need to get the device side of fastboot working as noted above. Plug your phone into the usb and if you see "serial0" hit the "back" key. You should now see "fastboot" on the screen.
+
-
 
+
-
==Fastboot Binary==
+
-
To make use of fastboot, you also need the fastboot program compiled for your host computer. If you have already built Android, you will have this file already. Its location should be:
+
-
<android source location>/out/host/{os}_{arch}/bin/fastboot
+
-
If you do not have fastboot built, you can either compile the [[Building the Android Platform|Android source]] or try DarkriftX's precompiled [http://android-dls.com/files/linux/fastboot fastboot] (compiled on kubuntu x86)
+
-
 
+
-
==Fastboot Commands==
+
-
Here are the commands you can run on your host after fastboot has been started on a device connected via USB.  This is a paste directly from the fastboot binary's "--help" command:
+
-
 
+
-
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
+
-
 
+
-
==Forcing fastboot to load on every boot==
+
-
Developers who are creating new images to try out very often can remove their boot and recovery images which will force the phone to enter bootloader mode every time you boot. To fix this, you would reflash the boot and recovery images back allowing the phone to boot normally.
+
-
 
+
-
$ fastboot erase boot
+
-
$ fastboot erase recovery
+
-
 
+
-
==More Info==
+
-
All or most of this information was obtained from [http://www.gotontheinter.net/fastboot Disconnect's site].
+

Revision as of 21:24, 1 August 2009

fhtagn

Personal tools