fastboot烧写image


1. 手机进入fastboot模式
先关机,开机时,同时按power键+camera或power + Home键,进入fastboot,红色字体
然后将手机和HOST,用USB线连接

2. 查看fastboot用法

$ sudo ./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
  format <partition>                       format 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
  continue                                 continue with autoboot
  reboot                                   reboot device normally
  reboot-bootloader                        reboot device into bootloader
  help                                     show this help message

options:
  -w                                       erase userdata and cache (and format
                                           if supported by partition type)
  -u                                       do not first erase partition before
                                           formatting
  -s <specific device>                     specify device serial number
                                           or path to device port
  -l                                       with "devices", lists device paths
  -p <product>                             specify product name
  -c <cmdline>                             override kernel commandline
  -i <vendor id>                           specify a custom USB vendor id
  -b <base_addr>                           specify a custom kernel base address
  -n <page size>                           specify the nand page size. default: 2048
  -S <size>[K|M|G]                         automatically sparse files greater than
                                           size.  0 to disable
3. 查看进入fastboot模式的设备
$ sudo ./fastboot devices
20080823    fastboot


4. 烧写image
$ sudo ./fastboot flash partition_name img_file

一般只烧boot.img, system.img和userdata.img三个镜像

$ sudo ./fastboot flash boot boot.img
sending 'boot' (4700 KB)...
OKAY [  4.770s]
writing 'boot'...
OKAY [  1.849s]
finished. total time: 6.642s

$ sudo ./fastboot flash system system.img
sending 'system' (85090 KB)...
OKAY [ 86.732s]
writing 'system'...
OKAY [ 33.991s]
finished. total time: 120.723s

$ sudo ./fastboot flash userdata userdata.img
sending 'userdata' (1456 KB)...
OKAY [  1.485s]
writing 'userdata'...
OKAY [  1.350s]
finished. total time: 2.835s

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值