Created
March 2, 2017 07:07
-
-
Save singlepig/8d52aea778a091bdd24939278c8a9278 to your computer and use it in GitHub Desktop.
unno刷机脚本
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
CURRENTPATH=`pwd` | |
# if no find flash_all_qcn.cmd found in current path, exit | |
if [[ ! -e $CURRENTPATH/flash_all_qcn.cmd ]]; then | |
echo -e "\e[1;31m Not in daily build path, exit! \e[0m" | |
exit 1 | |
fi | |
DIFF=`diff $CURRENTPATH/flash_all_qcn.cmd ~/work/gysbox/flash_all_qcn.cmd` | |
printDiff() { | |
echo "==== Difference: ====" | |
diff $CURRENTPATH/flash_all_qcn.cmd ~/work/gysbox/flash_all_qcn.cmd | |
echo "=====================" | |
} | |
# if DIFF is null, stop | |
if [[ -n $DIFF ]]; then | |
echo -e "\e[1;31m Flash command changed! Change FlashCMD! \e[0m" | |
printDiff | |
exit 1 | |
fi | |
FlashCMD() { | |
adb wait-for-device reboot bootloader | |
fastboot oem unlock | |
fastboot erase modem | |
fastboot flash modem ./images/NON-HLOS.bin | |
fastboot erase sbl1 | |
fastboot flash sbl1 ./images/sbl1.mbn | |
fastboot erase sbl1bak | |
fastboot flash sbl1bak ./images/sbl1.mbn | |
fastboot erase rpm | |
fastboot flash rpm ./images/rpm.mbn | |
fastboot erase rpmbak | |
fastboot flash rpmbak ./images/rpm.mbn | |
fastboot erase tz | |
fastboot flash tz ./images/tz.mbn | |
fastboot erase tzbak | |
fastboot flash tzbak ./images/tz.mbn | |
fastboot erase devcfg | |
fastboot flash devcfg ./images/devcfg.mbn | |
fastboot erase devcfgbak | |
fastboot flash devcfgbak ./images/devcfg.mbn | |
fastboot erase dsp | |
fastboot flash dsp ./images/adspso.bin | |
fastboot erase sec | |
fastboot flash sec ./images/sec.dat | |
fastboot erase splash | |
fastboot flash splash ./images/splash.img | |
fastboot erase aboot | |
fastboot flash aboot ./images/emmc_appsboot.mbn | |
fastboot erase abootbak | |
fastboot flash abootbak ./images/emmc_appsboot.mbn | |
fastboot erase boot | |
fastboot flash boot ./images/boot.img | |
fastboot erase recovery | |
fastboot flash recovery ./images/recovery.img | |
fastboot erase lksecapp | |
fastboot flash lksecapp ./images/lksecapp.mbn | |
fastboot erase lksecappbak | |
fastboot flash lksecappbak ./images/lksecapp.mbn | |
fastboot erase system | |
fastboot -S 500M flash system ./images/system.img | |
fastboot erase cache | |
fastboot flash cache ./images/cache.img | |
fastboot erase persist | |
fastboot flash persist ./images/persist.img | |
fastboot erase mdtp | |
fastboot flash mdtp ./images/mdtp.img | |
fastboot erase cmnlib | |
fastboot flash cmnlib ./images/cmnlib.mbn | |
fastboot erase cmnlibbak | |
fastboot flash cmnlibbak ./images/cmnlib.mbn | |
fastboot erase cmnlib64 | |
fastboot flash cmnlib64 ./images/cmnlib64.mbn | |
fastboot erase cmnlib64bak | |
fastboot flash cmnlib64bak ./images/cmnlib64.mbn | |
fastboot erase keymaster | |
fastboot flash keymaster ./images/keymaster.mbn | |
fastboot erase keymasterbak | |
fastboot flash keymasterbak ./images/keymaster.mbn | |
fastboot erase userdata | |
fastboot flash userdata ./images/userdata.img | |
fastboot erase fsg | |
fastboot erase modemst1 | |
fastboot erase modemst2 | |
fastboot flash fsg ./images/fs_image.tar.gz.mbn.img | |
fastboot reboot | |
} | |
FlashCMD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment