Fastboot - Android-dls.com

Refer to: http://www.gotontheinter.net/content/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 mainAndroid sources so the easiest way is to just build the whole tree, and you'll find fastboot inout/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. Seehere to customize it.
kernel: (size?) Holds boot.img (the kernel and initrd.) Do it the easy way, usefastboot 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值