Difference between revisions of "Fastboot"
Line 60: | Line 60: | ||
| | ||
+ | |||
Line 65: | Line 66: | ||
=== Download Image === | === Download Image === | ||
− | To | + | To Flash Image |
<pre>fastboot flash <partition_name> <filename> | <pre>fastboot flash <partition_name> <filename> | ||
</pre> | </pre> | ||
Line 71: | Line 72: | ||
(For example:fastboot flash system system.img | (For example:fastboot flash system system.img | ||
− | When download the parameter or | + | When download the parameter or loader,you need assign the partition name as "parameter" or "loader") |
To Update Firmware | To Update Firmware | ||
Line 78: | Line 79: | ||
(The firmware package was generated from android source code which is “make updatepackage”) | (The firmware package was generated from android source code which is “make updatepackage”) | ||
− | |||
− | |||
| | ||
− | |||
== Reboot == | == Reboot == |
Revision as of 03:42, 9 March 2017
Contents
Introduction
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>
To Get Version:
fastboot getvar version
To Get Version:
fastboot getvar version-bootloader
To Get Unlocked:
fastboot getvar unlocked
To Get Locked:
fastboot getvar secure
To Get Product Information:
fastboot getvar product
To Get Serialno:
fastboot getvar serialno
To Get Partition Type:
fastboot getvar partition-type:<partition_name>
To Get Partition Size:
fastboot getvar partition-size:<partition_name>
To Get Partition Offset:
fastboot getvar partition-offset:<partition_name>
Download Image
To Flash Image
fastboot flash <partition_name> <filename>
(For example:fastboot flash system system.img
When download the parameter or loader,you need assign the partition name as "parameter" or "loader")
To Update Firmware
fastboot update <filename>
(The firmware package was generated from android source code which is “make updatepackage”)
Reboot
重启进recovery
fastboot oem recovery
重启恢复出厂设置
fastboot oem recovery:wipe_data
Reboot
fastboot reboot
重启进入rockusb烧写模式
fastboot reboot-bootloader
fastboot continue
Lock and Unlock the Device
fastboot oem unlock 解锁
fastboot oem unlock_accept 确认解锁
(需要在fastboot oem unlock命令后,5秒内输入)
fastboot oem lock 锁住设备
Special Command
fastboot boot <kernel> [ <ramdisk> ] 临时从指定固件启动
(kernel目前支持Image/zImage,需要将dtb存于kernel末尾,或者resource分区中)
fastboot oem log 获取串口log信息
fastboot oem ucmd <UBOOT cmds> 运行UBOOT命令 </pre>
Fastboot Unlock
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