0% found this document useful (0 votes)
90 views2 pages

Flash All

The document contains a script that uses fastboot commands to flash images to different partitions of a device, including boot, system, vendor, and others. It checks for errors after flashing each partition and will exit if any errors occur. After flashing all partitions, it erases and flashes the cust and boot partitions, then reboots the device.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views2 pages

Flash All

The document contains a script that uses fastboot commands to flash images to different partitions of a device, including boot, system, vendor, and others. It checks for errors after flashing each partition and will exit if any errors occur. After flashing all partitions, it erases and flashes the cust and boot partitions, then reboots the device.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

fastboot $* getvar product 2>&1 | grep "^product: *dipper"

if [ $? -ne 0 ] ; then echo "Missmatching image and device"; exit 1; fi


#CURRENT_ANTI_VER=1
#ver=`fastboot $* getvar anti 2>&1 | grep -oP "anti: \K[0-9]+"`
#if [ -z "$ver" ]; then ver=0; fi
#if [ $ver -gt $CURRENT_ANTI_VER ]; then echo "current device antirollback version
is greater then this pakcage"; exit 1; fi
fastboot $* erase boot
if [ $? -ne 0 ] ; then echo "Erase boot error"; exit 1; fi
fastboot $* flash crclist `dirname $0`/images/crclist.txt
if [ $? -ne 0 ] ; then echo "Flash crclist error"; exit 1; fi
fastboot $* flash sparsecrclist `dirname $0`/images/sparsecrclist.txt
if [ $? -ne 0 ] ; then echo "Flash sparsecrclist error"; exit 1; fi
fastboot $* flash xbl_ab `dirname $0`/images/xbl.img
if [ $? -ne 0 ] ; then echo "Flash xbl_ab error"; exit 1; fi
fastboot $* flash xbl_config_ab `dirname $0`/images/xbl_config.img
if [ $? -ne 0 ] ; then echo "Flash xbl_config_ab error"; exit 1; fi
fastboot $* flash abl_ab `dirname $0`/images/abl.img
if [ $? -ne 0 ] ; then echo "Flash abl_ab error"; exit 1; fi
fastboot $* flash tz_ab `dirname $0`/images/tz.img
if [ $? -ne 0 ] ; then echo "Flash tz_ab error"; exit 1; fi
fastboot $* flash hyp_ab `dirname $0`/images/hyp.img
if [ $? -ne 0 ] ; then echo "Flash hyp_ab error"; exit 1; fi
fastboot $* flash devcfg_ab `dirname $0`/images/devcfg.img
if [ $? -ne 0 ] ; then echo "Flash devcfg_ab error"; exit 1; fi
fastboot $* flash storsec_ab `dirname $0`/images/storsec.img
if [ $? -ne 0 ] ; then echo "Flash storsec_ab error"; exit 1; fi
fastboot $* flash bluetooth `dirname $0`/images/bluetooth.img
if [ $? -ne 0 ] ; then echo "Flash bluetooth error"; exit 1; fi
fastboot $* flash cmnlib_ab `dirname $0`/images/cmnlib.img
if [ $? -ne 0 ] ; then echo "Flash cmnlib_ab error"; exit 1; fi
fastboot $* flash cmnlib64_ab `dirname $0`/images/cmnlib64.img
if [ $? -ne 0 ] ; then echo "Flash cmnlib64_ab error"; exit 1; fi
fastboot $* flash modem `dirname $0`/images/modem.img
if [ $? -ne 0 ] ; then echo "Flash modem error"; exit 1; fi
fastboot $* flash dsp `dirname $0`/images/dsp.img
if [ $? -ne 0 ] ; then echo "Flash dsp error"; exit 1; fi
fastboot $* flash keymaster_ab `dirname $0`/images/keymaster.img
if [ $? -ne 0 ] ; then echo "Flash keymaster_ab error"; exit 1; fi
fastboot $* flash logo `dirname $0`/images/logo.img
if [ $? -ne 0 ] ; then echo "Flash logo error"; exit 1; fi
fastboot $* flash misc `dirname $0`/images/misc.img
if [ $? -ne 0 ] ; then echo "Flash misc error"; exit 1; fi
fastboot $* flash aop_ab `dirname $0`/images/aop.img
if [ $? -ne 0 ] ; then echo "Flash aop_ab error"; exit 1; fi
fastboot $* flash qupfw_ab `dirname $0`/images/qupfw.img
if [ $? -ne 0 ] ; then echo "Flash qupfw_ab error"; exit 1; fi
fastboot $* flash ImageFv `dirname $0`/images/imagefv.elf
if [ $? -ne 0 ] ; then echo "Flash ImageFv error"; exit 1; fi
fastboot $* flash vendor `dirname $0`/images/vendor.img
if [ $? -ne 0 ] ; then echo "Flash vendor error"; exit 1; fi
fastboot $* flash system `dirname $0`/images/system.img
if [ $? -ne 0 ] ; then echo "Flash system error"; exit 1; fi
fastboot $* flash userdata `dirname $0`/images/userdata.img
if [ $? -ne 0 ] ; then echo "Flash userdata error"; exit 1; fi
fastboot $* flash recovery `dirname $0`/images/recovery.img
if [ $? -ne 0 ] ; then echo "Flash recovery error"; exit 1; fi
fastboot $* flash cache `dirname $0`/images/cache.img
if [ $? -ne 0 ] ; then echo "Flash cache error"; exit 1; fi
fastboot $* erase sec
if [ $? -ne 0 ] ; then echo "Erase sec error"; exit 1; fi
fastboot $* flash cust `dirname $0`/images/cust.img
if [ $? -ne 0 ] ; then echo "Flash cust error"; exit 1; fi
fastboot $* flash boot `dirname $0`/images/boot.img
if [ $? -ne 0 ] ; then echo "Flash boot error"; exit 1; fi
fastboot $* reboot
if [ $? -ne 0 ] ; then echo "Reboot error"; exit 1; fi

You might also like