First, what Fastboot that?
1.1 introduces Recovery Mode (brush card)
When the system is customized, the compiler will compile a ZIP archive, which are some of the system partition image, to provide customers with a manual upgrade, restore the system. Advance compressed package built SDcard, in Recovery mode. Enter the Recovery Method: After the phone is completely shut, hold down volume key (on) + power button, enter BootLoader interface. With volume up and down to control the cursor, the power button to confirm (with only some of the machine to select the volume down key, the key is the Enter key). Note: Some machines may not preinstalled Recovery.
1.2 Introduction Recovery mode (wire brush)
In Andrews phone in Fastboot a lower level than Recovery Brush mode. Using USB cable one kind of connection mode of the Brush phone. This is called wire brush, compared with Recovery Mode Fastboot need to have some burn-in command, for some card system for brush, wire brush is more reliable and secure.
Two, Android system partition description
hboot-- system boot boot similar computer BIOS, brush the wrong mobile phone will become a piece of brick
radio-- communication modules, baseband, WIFI, Bluetooth adapter hardware drivers and other software
Recovery - is responsible for recovering from system failures
boot - Linux embedded systems kernel
system-- system files, application
cache runtime system generated cache--
userdata-- user using the generated cache data APP
Three, Fastboot environment to build
3.1 Android SDK tools platform-tools directory drawings:
Enter the directory you can use adb, fastboot command, and you can also configure the environment variables do not each too much trouble. This directory can be a separate copy out, easy to carry a little, SDK is too big. In fact, many tools Brush, Brush script revolves around this Brush tool, the use of which is adb, fastboot command, but others will judge each case written procedures only.
Four, Fastboot command Brush
4.1 steps and write the partition command
Whether 4.1.1 adb devices-- view the phone connection
4.1.2 adb reboot bootloader-- restart the phone to Fastboot mode
4.1.3 fastboot connected devices-- see Fastboot mode phones
4.1.4 Partition written as follows :( Several example: a particular path system.img brush into partitions computer)
-
fastboot flash system system.img
-
fastboot flash boot boot.img
-
fastboot flash radio radio.img
-
...
Restart the phone at Fastboot mode - 4.1.5 fastboot reboot
4.2 Erase command partition
4.1.1--4.1.3 before erasing the partition need to follow the steps to go again, will erase the partition back to the state before use
-
fastboot erase system
-
fastboot erase boot
-
...
【Ready to work】
First of all need to be ready Brush Pack, it can be compiled yourself, it can be copied elsewhere, but we must ensure Brush package is suitable for your Android device. Then extract the Brush Pack, unpacked we can get boot.img, recovery.img, system.img, bootloader file, it is these documents constitute the system for Android devices.
Put the device into fastboot environment. There are two ways:
Execute the command adb reboot fastboot
or
Press and hold the power button to increase the volume and turn.
[] Command execution process
After the device into fastboot environment, the following command Brush according to requirements:
fastboot flashing unlock # unlock the device, start brushing machine
fastboot flash boot boot.img # brush into the boot partition. If you modify the kernel code, you should brush into this partition to take effect
fastboot flash recovery recovery.img # brush into recovery partition
fastboot flash country country.img # brush partitions the country. This partition is set to develop its own division, not necessarily on other Android devices
fastboot flash system system.img # brush into the system partition. If the modified code files generated under the influence out / system / path, then that partition into the brush should take effect
fastboot flash bootloader bootloader # 刷入 bootloader
fastboot erase frp # erase partitions frp, frp namely Factory Reset Protection, used to prevent the leakage of user information in the phone is lost
fastboot format data # formatted data partition
fastboot flashing lock # locking device, completed brush
fastboot continue # automatic reboot
from:https://blog.csdn.net/s13383754499/article/details/82755012