From Rockchip open source Document
Revision as of 12:24, 8 March 2017 by Kever (talk | contribs)
Jump to: navigation, search


Fastboot is a protocol that can be used to re-flash partitions on your device (update the flash file system in your devices). It is this small tool that comes with the Android SDK (Software Developer Kit), which is an alternative to the Recovery Mode for doing installations and updates. It first comes with Android. Google have submit the fastboot code to mainline U-boot. So we can use this protocol to flash partition on your device. There are three way to enter fastboot mode

Fastboot command

Rockchip use 0x2207 as its USB vendor ID. This VID is not in Google's original fastboot code. So every fastboot command have to use "-i" parameter to specify vid to fastboot.
To list all the Rockchip devices attached to your USB port in fastboot mode.

<code>$ sudo fastboot -i 0x2207 devices
0123456789AB fastboot</code>

To flash loader

<code>$ sudo fastboot -i 0x2207 flash loader "path to your loader"</code>

To flash Android boot image

<code>$ sudo fastboot -i 0x2207 flash boot_a "path to your boot image"
0123456789AB fastboot</code>

To flash Android system image

<code>$ sudo fastboot -i 0x2207 flash system_a "path to your system image"
0123456789AB fastboot</code>

fastboot getvar version                                               获得版本

fastboot getvar version-bootloader                                   获得版本

fastboot getvar unlocked                                            获得解锁情况

fastboot getvar secure                                          获得锁住情况(与unlock相反)

fastboot getvar product                                              获得产品信息

fastboot getvar serialno                                              获得序列号

fastboot getvar partition-type:<partition_name>             获得指定分区类型

fastboot getvar partition-size:<partition_name>              获得指定分区大小

fastboot getvar partition-offset:<partition_name>                  获得指定分区偏移


fastboot flash <partition_name> <filename>                   烧写固件

(如:fastboot flash system system.img。


fastboot update <filename>                                       烧写升级包

(升级包通过在android源码中make updatepackage生成)

1.2 重启

fastboot oem recovery                                          重启进recovery

fastboot oem recovery:wipe_data                               重启恢复出厂设置

fastboot reboot                                                     重启

fastboot reboot-bootloader                                         重启进入rockusb烧写模式

fastboot continue                                                  重启

1.2.1 解锁和锁住设备

fastboot oem unlock                                             解锁

fastboot oem unlock_accept                                        确认解锁

(需要在fastboot oem unlock命令后,5秒内输入)

fastboot oem lock                                                 锁住设备

1.2.2 特殊命令

fastboot boot <kernel> [ <ramdisk> ]                             临时从指定固件启动


fastboot oem log                                                  获取串口log信息

fastboot oem ucmd <UBOOT cmds>                                 运行UBOOT命令

1.3 Fastboot解锁



1、执行fastboot oem unlock

2、5秒内继续执行fastboot oem unlock_accept


4、再次进入fastboot,则fastboot getvar unlocked应该返回"yes"(设备已解锁)


如果设备进入fastboot状态后,fastboot命令提示未发现设备,则需要在命令中加入-i参数指定设备vid,例如fastboot -i 0x2207 getvar unlocked