flash all bat file
My redmi note 8 pro got bricked so I downloaded the factory image and executed the flash all bat file and it got stuck here please help
tried all things but the it is still not working please help urgent
I saw this video https://youtu.be/ogGy2cnP2mE?si=-JcDeXzbNxpVvXQb
This is the bat file source code
if [ -e $(dirname $0)/images/anti_version.txt ]; then
CURRENT_ANTI_VER=`cat $(dirname $0)/images/anti_version.txt`
fi
if [ -z "$CURRENT_ANTI_VER" ]; then CURRENT_ANTI_VER=0; fi
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 than this pakcage"; exit 1; fi
fastboot $* getvar product 2>&1 | grep "^product: *begonia*"
if [ $? -ne 0 ] ; then echo "Missmatching image and device"; exit 1; fi
SCRIPT_PATH=$(dirname $0)
handle_error(){
echo $@
exit 2;
}
fastboot $* flash crclist ${SCRIPT_PATH}/images/crclist.txt || handle_error flash crclist error
fastboot $* flash sparsecrclist ${SCRIPT_PATH}/images/sparsecrclist.txt || handle_error flash sparsecrclist error
fastboot $* erase boot || handle_error erase boot error
fastboot $* flash preloader ${SCRIPT_PATH}/images/preloader_begoniain.bin || handle_error flash begoniain error
fastboot $* flash lk ${SCRIPT_PATH}/images/lk.img || handle_error flash lk error
fastboot $* flash lk2 ${SCRIPT_PATH}/images/lk.img || handle_error flash lk2 error
fastboot $* flash tee1 ${SCRIPT_PATH}/images/tee.img || handle_error flash tee1 error
fastboot $* flash tee2 ${SCRIPT_PATH}/images/tee.img || handle_error flash tee2 error
fastboot $* flash sspm_1 ${SCRIPT_PATH}/images/sspm.img || handle_error flash sspm_1 error
fastboot $* flash sspm_2 ${SCRIPT_PATH}/images/sspm.img || handle_error flash sspm_2 error
fastboot $* flash gz1 ${SCRIPT_PATH}/images/gz.img || handle_error flash gz1 error
fastboot $* flash gz2 ${SCRIPT_PATH}/images/gz.img || handle_error flash gz2 error
fastboot $* flash scp1 ${SCRIPT_PATH}/images/scp.img || handle_error flash scp1 error
fastboot $* flash scp2 ${SCRIPT_PATH}/images/scp.img || handle_error flash scp2 error
fastboot $* flash logo ${SCRIPT_PATH}/images/logo.bin || handle_error flash logo error
fastboot $* flash dtbo ${SCRIPT_PATH}/images/dtbo.img || handle_error flash dtbo error
fastboot $* flash spmfw ${SCRIPT_PATH}/images/spmfw.img || handle_error flash spmfw error
fastboot $* flash exaid ${SCRIPT_PATH}/images/exaid.img || handle_error flash exaid error
fastboot $* flash oem_misc1 ${SCRIPT_PATH}/images/oem_misc1.img || handle_error flash oem_misc1 error
fastboot $* flash md1img ${SCRIPT_PATH}/images/md1img.img || handle_error flash md1img error
fastboot $* flash cam_vpu1 ${SCRIPT_PATH}/images/cam_vpu1.img || handle_error flash cam_vpu1 error
fastboot $* flash cam_vpu2 ${SCRIPT_PATH}/images/cam_vpu2.img || handle_error flash cam_vpu2 error
fastboot $* flash cam_vpu3 ${SCRIPT_PATH}/images/cam_vpu3.img || handle_error flash cam_vpu3 error
fastboot $* flash audio_dsp ${SCRIPT_PATH}/images/audio_dsp.img || handle_error flash audio_dsp error
fastboot $* flash vendor ${SCRIPT_PATH}/images/vendor.img || handle_error flash vendor error
fastboot $* flash system ${SCRIPT_PATH}/images/system.img || handle_error flash system error
fastboot $* flash cache ${SCRIPT_PATH}/images/cache.img || handle_error flash cache error
fastboot $* flash recovery ${SCRIPT_PATH}/images/recovery.img || handle_error flash recovery error
fastboot $* flash cust ${SCRIPT_PATH}/images/cust.img || handle_error flash cust error
fastboot $* flash vbmeta ${SCRIPT_PATH}/images/vbmeta.img || handle_error flash vbmeta error
fastboot $* flash userdata ${SCRIPT_PATH}/images/userdata.img || handle_error flash userdata error
fastboot $* flash boot ${SCRIPT_PATH}/images/boot.img || handle_error flash boot error
fastboot $* reboot
if [ $? -ne 0 ] ; then echo "Reboot error"; exit 1; fi
exit 0
New contributor
Biswanath Koner is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.