Xiaomi Redmi 5A Engineering

echo “riva Fastboot Tool Ver 3.0”

fastboot %* getvar product 2>&1 | findstr /r /c:”^product: *riva” || echo Missmatching image and device

fastboot %* getvar product 2>&1 | findstr /r /c:”^product: *riva” || exit /B 1

fastboot %* flash partition “%~dp0imagesgpt_both0.bin” || @echo “Flash tz error” && exit /B 1

if exist “%~dp0imagescrclist.txt” (fastboot %* flash crclist “%~dp0imagescrclist.txt” 2>nul)

if exist “%~dp0imagessparsecrclist.txt” (fastboot %* flash sparsecrclist “%~dp0imagessparsecrclist.txt” 2>nul)

fastboot %* flash tz “%~dp0imagestz.mbn” || @echo “Flash tz error” && exit /B 1

fastboot %* flash sbl1 “%~dp0imagessbl1.mbn” || @echo “Flash sbl1 error” && exit /B 1

fastboot %* flash rpm “%~dp0imagesrpm.mbn” || @echo “Flash rpm error” && exit /B 1

fastboot %* flash aboot “%~dp0imagesemmc_appsboot.mbn” || @echo “Flash emmc_appsboot error” && exit /B 1

fastboot %* flash tzbak “%~dp0imagestz.mbn” || @echo “Flash tzbak error” && exit /B 1

fastboot %* flash sbl1bak “%~dp0imagessbl1.mbn” || @echo “Flash sbl1bak error” && exit /B 1

fastboot %* flash rpmbak “%~dp0imagesrpm.mbn” || @echo “Flash uboot rpmbak” && exit /B 1

fastboot %* flash abootbak “%~dp0imagesemmc_appsboot.mbn” || @echo “Flash abootbak error” && exit /B 1

fastboot %* flash devcfg “%~dp0imagesdevcfg.mbn” || @echo “Flash devcfg error” && exit /B 1

fastboot %* flash lksecapp “%~dp0imageslksecapp.mbn” || @echo “Flash lksecapp error” && exit /B 1

fastboot %* flash cmnlib “%~dp0imagescmnlib.mbn” || @echo “Flash cmnlib error” && exit /B 1

fastboot %* flash cmnlib64 “%~dp0imagescmnlib64.mbn” || @echo “Flash cmnlib64 error” && exit /B 1

fastboot %* flash keymaster “%~dp0imageskeymaster.mbn” || @echo “Flash keymaster error” && exit /B 1

fastboot %* flash devcfgbak “%~dp0imagesdevcfg.mbn” || @echo “Flash devcfgbak error” && exit /B 1

fastboot %* flash lksecappbak “%~dp0imageslksecapp.mbn” || @echo “Flash lksecappbak error” && exit /B 1

fastboot %* flash cmnlibbak “%~dp0imagescmnlib.mbn” || @echo “Flash cmnlibbak error” && exit /B 1

fastboot %* flash cmnlib64bak “%~dp0imagescmnlib64.mbn” || @echo “Flash cmnlib64bak error” && exit /B 1

fastboot %* flash keymasterbak “%~dp0imageskeymaster.mbn” || @echo “Flash keymasterbak error” && exit /B 1

fastboot %* flash dsp “%~dp0imagesadspso.bin” || @echo “Flash dsp error” && exit /B 1

fastboot %* erase boot

fastboot %* erase mdtp

fastboot %* flash modem “%~dp0imagesNON-HLOS.bin” || @echo “Flash modem error” && exit /B 1

fastboot %* flash system “%~dp0imagessystem.img” || @echo “Flash system error” && exit /B 1

fastboot %* flash cache “%~dp0imagescache.img” || @echo “Flash cache error” && exit /B 1

fastboot %* flash userdata “%~dp0imagesuserdata.img” || @echo “Flash userdata error” && exit /B 1

fastboot %* flash recovery “%~dp0imagesrecovery.img” || @echo “Flash recovery error” && exit /B 1

fastboot %* flash boot “%~dp0imagesboot.img” || @echo “Flash boot error” && exit /B 1

fastboot %* flash splash “%~dp0imagessplash.img” || @echo “Flash splash error” && exit /B 1

fastboot %* flash cust “%~dp0imagescust.img” || @echo “Flash cust error” && exit /B 1

fastboot %* reboot

pause

More from my site