//第一步
adb device
// 如果不能
cd AndroidSDK/platform-tools
adb kill-server
adb start-server
//第二步
adb reboot bootloader
sudo ./fastboot devices
sudo ./fastboot flash boot xx/xx/xx/xx/boot.img
sudo ./fastboot flash system xx/xx/xx/system.img
sudo ./fastboot flash userdata xx/xx/xx/userdata.img
sudo ./fastboot reboot //重启
//以下是完整文件
fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash boot boot.img
fastboot flash system system.img
fastboot flash userdata userdata.img
fastboot flash persist persist.img
fastboot flash recovery recovery.img