1. I saw a good post on the online record of happy phone:
Adb devices view connected devices
Adb reboot-bootloader enables the mobile phone to enter fastboot Mode
Fastboot devices: The device list is displayed.
Run the following command to write boot, systerm, and userdata.
Fastboot flash boot path \ boot. img
Fastboot flash system path \ system. img
Fastboot flash userdata path \ userdata. img
Then use fastboot reboot to restart the device.
2. Use fastboot
Android mobile phone partition (each partition corresponds to an imgfile): boot screen area (splash1), data recovery area (recovery), kernel area (boot ),
System, data cache, and userdata ).
1. view the help of the fastboot command:
Fastboot
The following information is displayed:
Usage: fastboot [<option>] <command>
Commands:
Update <filename> reflash device from update.zip
Flashall "flash boot" + "flash system"
Flash <partition> [<filename>] write a file to a flash partition
Erase <partition> erase a flash partition
Getvar <variable> display a bootloader variable
Boot <kernel> [<ramdisk>] download and boot kernel
Flash: raw boot <kernel> [<ramdisk>] create bootimage and flash it
Devices list all connected devices
Reboot device normally
Reboot-bootloader reboot device into bootloader
Options:
-W erase userdata and cache
-S <serial number> specify device serial number
-P <product> specify product name
-C <cmdline> override kernel commandline
-I <vendor id> specify a custom USB vendor id
2. Erase partitions:
Fastboot erase {partition} example: fastboot erase boot or fastboot erase system.
Format fastboot OEM format
Fastboot erase cache clear Cache
3. Burn the specified partition:
Fastboot flash {partition} {*. IMG} example: fastboot Flash boot. IMG or fastboot flash system. IMG.
4. Burn all partitions:
Fastboot flashall Note: This command searches for all imgfiles in the current directory, burns these imgfiles to all corresponding partitions, and restarts the mobile phone.
5. One boot, system, and recovery partition:
(1) create a zip package containing the boot. IMG, system. IMG, and recovery. imgfile.
(2) execute: fastboot update {*. Zip}
6. Burn the boot screen:
Fastboot flash splash1 boot Screen
7. Restart the mobile phone:
Fastboot reboot