Asus ZenFone 4 Selfie ZD553KL

@echo off

set /a total=0

set “dataerase=0”

set “para=”

set “devname=”

set “gotname=”

echo please make sure your device is under fastboot mode.

echo press ‘Ctrl + C’ can abort this scripts.

if [%1] == [1] (set dataerase=1)

if not [%2] == [] (set para=-s)

echo set dataerase = %dataerase% and para = %para%

@set fb=fastboot %para% %2

:: there’s no command “fastboot wait”,

:: but this can ensure that fastboot is available after the reboot.

fastboot wait >nul 2>&1

fastboot getvar device_name > devname_tmp.txt 2>&1

for /f “tokens=2 delims=: ” %%i in (devname_tmp.txt) do (

set devname=%%i & goto :next

)

:next

del /f /s /q devname_tmp.txt

:devname_intercept_left

if “%devname:~0,1%”==” ” set “devname=%str:~1%” & goto :devname_intercept_left

:devname_intercept_right

if “%devname:~-1%”==” ” set “devname=%devname:~0,-1%” & goto :devname_intercept_right

echo got device_name is ——!%devname%!——

for %%i in (ASUS_X00LD_1 ASUS_X00LD_2 ASUS_X00LD_3) do (

if “%%i” == “%devname%” (set gotname=1) & goto checknamenext

)

:checknamenext

if “%gotname%” == “1” (goto namefixed) else (goto namenotfix)

:namenotfix

echo got device_name error, can’t decide which version should be flashed.

echo any questions please contact with software PM.

echo will not do flash, but reboot the device now.

goto Error

:namefixed

echo Start image update…

::

:: flash iamges for AA1BA1CA1

if “%devname%” == “ASUS_X00LD_1” (goto :AA1BA1CA1) else (goto :AA1BA1CA1next)

:AA1BA1CA1

%fb% flash aboot 8937_emmc_appsboot.mbn

if not %errorlevel% == 0 (echo update aboot failed. && goto Error)

fastboot reboot-bootloader

echo wscript.sleep 5000>sleep.vbs

start /wait sleep.vbs

del /f /s /q sleep.vbs

fastboot wait >nul 2>&1

call .sub_scriptsflashAA1BA1CA1.bat

if not %errorlevel% == 0 ( goto Error)

:AA1BA1CA1next


::

:: flash images for DA1

if “%devname%” == “ASUS_X00LD_2” (goto :D A1) else (goto :D A1next)

:D A1

%fb% flash aboot 8937_emmc_appsboot.mbn

if not %errorlevel% == 0 (echo update aboot failed. && goto Error)

fastboot reboot-bootloader

echo wscript.sleep 5000>sleep.vbs

start /wait sleep.vbs

del /f /s /q sleep.vbs

fastboot wait >nul 2>&1

call .sub_scriptsflashDA1.bat

if not %errorlevel% == 0 ( goto Error)

:D A1next


::

:: flash images for AA2

if “%devname%” == “ASUS_X00LD_3” (goto :AA2) else (goto :AA2next)

:AA2

%fb% flash aboot 8917_emmc_appsboot.mbn

if not %errorlevel% == 0 (echo update aboot failed. && goto Error)

fastboot reboot-bootloader

echo wscript.sleep 5000>sleep.vbs

start /wait sleep.vbs

del /f /s /q sleep.vbs

fastboot wait >nul 2>&1

call .sub_scriptsflashAA2.bat

if not %errorlevel% == 0 ( goto Error)

:AA2next

echo Total update %total% images.

echo update Images done.

fastboot reboot

goto :END

:Error

echo Image Update ERROR !!!

goto :END

:END

set total=

set dataerase=

set para=

set fb=

set devname=

set gotname=

rem @pause

================
NOTE: You can’t download pls contact to email [email protected] , i will sent link download for you
+++++++++

Donator is respected because they help us keep Findrom.info be the biggest Firmware library. Thank you very much!




More from my site