Difference between revisions of "Fastboot"

From Rockchip open source Document
Jump to: navigation, search
(创建页面,内容为“ == [[|1.1Fastboot]]主要支持命令 == === [[|1.1.1获取信息]] === {| border="1" cellpadding="0" cellspacing="0" width="760" |- | style="width:608px;" | fas...”)
(No difference)

Revision as of 02:47, 22 February 2017

1.1Fastboot主要支持命令

1.1.1获取信息

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>                  获得指定分区偏移

1.1.2 镜像烧写

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

(如:fastboot flash system system.img。

烧写parameter/loader时,需指定分区名为”parameter”/”loader”)

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> ]                             临时从指定固件启动

(kernel目前支持Image/zImage,需要将dtb存于kernel末尾,或者resource分区中)

fastboot oem log                                                  获取串口log信息

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

1.3 Fastboot解锁

fastboot锁住状态下,不允许烧写及执行oem命令,初始状态为锁住。

解锁流程大致如下:

1、执行fastboot oem unlock

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

3、机器会重启进入recovery恢复出厂设置

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

 

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