Difference between revisions of "Fastboot"
(11 intermediate revisions by one other user not shown) | |||
Line 4: | Line 4: | ||
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 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 = | = 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.<br/> To list all the Rockchip devices attached to your USB port in fastboot mode. | 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.<br/> To list all the Rockchip devices attached to your USB port in fastboot mode. | ||
− | <pre | + | <pre>$ sudo fastboot -i 0x2207 devices |
− | 0123456789AB fastboot | + | 0123456789AB fastboot |
</pre> | </pre> | ||
To flash loader | To flash loader | ||
− | <pre | + | <pre>$ sudo fastboot -i 0x2207 flash loader "path to your loader" |
</pre> | </pre> | ||
To flash android boot image | To flash android boot image | ||
− | <pre | + | <pre>$ sudo fastboot -i 0x2207 flash boot_a "path to your boot image" |
− | 0123456789AB fastboot | + | 0123456789AB fastboot |
</pre> | </pre> | ||
To flash android system image | To flash android system image | ||
− | <pre | + | <pre>$ sudo fastboot -i 0x2207 flash system_a "path to your system image" |
− | 0123456789AB fastboot | + | 0123456789AB fastboot</pre> |
To get version: | To get version: | ||
Line 63: | Line 64: | ||
</pre> | </pre> | ||
− | + | | |
== Download the Image == | == Download the Image == | ||
Line 80: | Line 81: | ||
(The firmware package was generated from android source code <var>make updatepackage</var>) | (The firmware package was generated from android source code <var>make updatepackage</var>) | ||
+ | |||
+ | | ||
== Reboot == | == Reboot == | ||
Line 92: | Line 95: | ||
<pre>fastboot reboot</pre> | <pre>fastboot reboot</pre> | ||
− | To reboot and enter rockusb loader mode | + | To reboot and enter into rockusb loader mode |
<pre>fastboot reboot-bootloader</pre> | <pre>fastboot reboot-bootloader</pre> | ||
To continue: | To continue: | ||
<pre>fastboot continue </pre> | <pre>fastboot continue </pre> | ||
+ | |||
+ | | ||
=== Lock and Unlock the Device === | === Lock and Unlock the Device === | ||
Line 103: | Line 108: | ||
<pre>fastboot oem unlock</pre> | <pre>fastboot oem unlock</pre> | ||
− | To confirm unlock(input it in 5 minutes after | + | To confirm unlock(input it in 5 minutes after typing <var>fastboot oem unlock command</var>): |
<pre>fastboot oem unlock_accep</pre> | <pre>fastboot oem unlock_accep</pre> | ||
Line 114: | Line 119: | ||
=== Special Command === | === Special Command === | ||
− | To boot from specifc firmware: | + | To boot from specifc firmware templately: |
<pre>fastboot boot <kernel> [ <ramdisk> ]</pre> | <pre>fastboot boot <kernel> [ <ramdisk> ]</pre> | ||
− | + | (Kernel supports Image/zImage,and you should keep <var>dtb</var> in the last part of kernel,or <var>resource partition</var>) | |
+ | |||
+ | To generate a log file: | ||
<pre>fastboot oem log </pre> | <pre>fastboot oem log </pre> | ||
Line 123: | Line 130: | ||
<pre>fastboot oem ucmd <UBOOT cmds></pre> | <pre>fastboot oem ucmd <UBOOT cmds></pre> | ||
− | + | | |
− | + | | |
− | + | | |
− | + | | |
− | + | == Unlock your Device via Fastboot == | |
− | + | Initially,it is not allow you perform flash or oem command with locked fastboot. | |
− | + | '''To relock''': | |
+ | |||
+ | 1、Executing <var>fastboot oem unlock</var> | ||
+ | |||
+ | 2、Then executing <var>fastboot oem unlock_accept in 5 seconds,</var> | ||
+ | |||
+ | 3、You device will reboot and recovery | ||
+ | |||
+ | 4、Now push your device into fastboot mode again and <var>fastboot getvar unlocked will return to </var>"yes" | ||
+ | |||
+ | (Congraduations you have unlock your device finished!) | ||
+ | |||
+ | What if the device have entered into fastboot mode with indicates that <var>NOT found your device</var>, you need put '''<var>-i </var>'''into your command in order to assign device ID. | ||
+ | |||
+ | For example:fastboot -i 0x2207 getvar unlocked | ||
| | ||
− | |||
− |
Latest revision as of 11:20, 16 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.
$ sudo fastboot -i 0x2207 devices 0123456789AB fastboot
To flash loader
$ sudo fastboot -i 0x2207 flash loader "path to your loader"
To flash android boot image
$ sudo fastboot -i 0x2207 flash boot_a "path to your boot image" 0123456789AB fastboot
To flash android system image
$ sudo fastboot -i 0x2207 flash system_a "path to your system image" 0123456789AB fastboot
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 the 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 make updatepackage)
Reboot
To recovery:
fastboot oem recovery
To recovery and restore:
fastboot oem recovery:wipe_data
To Reboot:
fastboot reboot
To reboot and enter into rockusb loader mode
fastboot reboot-bootloader
To continue:
fastboot continue
Lock and Unlock the Device
To unlock:
fastboot oem unlock
To confirm unlock(input it in 5 minutes after typing fastboot oem unlock command):
fastboot oem unlock_accep
To lock the device:
fastboot oem lock
Special Command
To boot from specifc firmware templately:
fastboot boot <kernel> [ <ramdisk> ]
(Kernel supports Image/zImage,and you should keep dtb in the last part of kernel,or resource partition)
To generate a log file:
fastboot oem log
To execute u-Boot command:
fastboot oem ucmd <UBOOT cmds>
Unlock your Device via Fastboot
Initially,it is not allow you perform flash or oem command with locked fastboot.
To relock:
1、Executing fastboot oem unlock
2、Then executing fastboot oem unlock_accept in 5 seconds,
3、You device will reboot and recovery
4、Now push your device into fastboot mode again and fastboot getvar unlocked will return to "yes"
(Congraduations you have unlock your device finished!)
What if the device have entered into fastboot mode with indicates that NOT found your device, you need put -i into your command in order to assign device ID.
For example:fastboot -i 0x2207 getvar unlocked