@echo off
adb reboot bootloader
echo for not erase modemst1 and modest2
rem fastboot flash partition gpt_both0.bin
fastboot flash aboot emmc_appsboot.mbn
fastboot flash abootbak emmc_appsboot.mbn
fastboot flash sbl1 sbl1.mbn
fastboot flash sbl1bak sbl1.mbn
fastboot flash tz tz.mbn
fastboot flash tzbak tz.mbn
fastboot flash hyp hyp.mbn
fastboot flash hypbak hyp.mbn
fastboot flash rpm rpm.mbn
fastboot flash rpmbak rpm.mbn
rem fastboot flash sec sec.dat
rem fastboot flash fsg fs_image.tar.gz.mbn.img
rem fastboot flash modemst1 dummy.bin
rem fastboot flash modemst2 dummy.bin
fastboot flash modem NON-HLOS.bin
echo for not erase bt and wifi information
rem fastboot flash persist persist.img
fastboot flash cache cache.img
fastboot erase splash
fastboot flash splash splash.img
fastboot -S 256M flash system system.img
rem fastboot flash system system.img
fastboot flash recovery recovery.img
fastboot -S 256M flash userdata userdata.img
rem fastboot flash userdata userdata.img
fastboot flash boot boot.img
if exist custom.img (
fastboot flash custom custom.img
)
fastboot reboot