Asus ZenFone 7 ZS670KS

@echo off & setlocal enabledelayedexpansion

for /F “tokens=1,2 delims=#” %%a in (‘”prompt #$H#$E# & echo on & for %%b in (1) do rem”‘) do (

set “DEL=%%a”

)

if “%2” NEQ “” (

set FASTBOOT=fastboot -s %2

) else (

set FASTBOOT=fastboot

)

%FASTBOOT% oem get_prj > getprjtemp.txt 2>&1

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

set “project=%%i”

)

del getprjtemp.txt

if “x%project%” equ “x ZS670KS” (

call :color_text 0a “Project%project% matching success!” & echo,

) else (

call :color_text 0c “The script can’t be used in the project%project%!” & echo,

pause

exit 1

)

:: ====================== flash: abl ====================

call :flash_image abl_a abl.elf

call :flash_image abl_b abl.elf

%FASTBOOT% reboot-bootloader

ping 0.0.0.0 -n 10 > nul

:: ============== add for fac flash fail ================

call :flash_image multiimgoem_a firmwaremulti_image.mbn

call :flash_image multiimgoem_b firmwaremulti_image.mbn

:: ==================== partition_0 =====================

%FASTBOOT% flash partition:0 gpt_both0.bin

call :failure_prompt !errorlevel! partition0

:: ==================== partition_1 =====================

%FASTBOOT% flash partition:1 gpt_both1.bin

call :failure_prompt !errorlevel! partition1

:: ==================== partition_2 =====================

%FASTBOOT% flash partition:2 gpt_both2.bin

call :failure_prompt !errorlevel! partition2


:: ==================== partition_3 =====================

%FASTBOOT% flash partition:3 gpt_both3.bin

call :failure_prompt !errorlevel! partition3


:: ==================== partition_4 =====================

%FASTBOOT% flash partition:4 gpt_both4.bin

call :failure_prompt !errorlevel! partition4


:: ==================== partition_5 =====================

%FASTBOOT% flash partition:5 gpt_both5.bin

call :failure_prompt !errorlevel! partition5


:: ==================== partition_6 =====================

%FASTBOOT% flash partition:6 gpt_both6.bin

call :failure_prompt !errorlevel! partition6

%FASTBOOT% oem getddr > getddrtemp.txt 2>&1

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

set “ddrtype=%%i”

)

del getddrtemp.txt

if “x%ddrtype%” equ “x LP4” (

set ddr=4

) else if “x%ddrtype%” equ “x LP5” (

set ddr=5

) else (call :color_text 0c “Not the expected ddr,press any key to exit the script! ” & echo,)

call :color_text 0a “This phone is lp%ddr%!” & echo,

:: ================ flash: multiimgoem ==================

call :flash_image multiimgoem_a firmwaremulti_image.mbn

call :flash_image multiimgoem_b firmwaremulti_image.mbn

:: =============== flash: xbl & xbl_config===============

call :flash_image xbl_a firmwarexbl_lp%ddr%.elf

call :flash_image xbl_config_a firmwarexbl_config_lp%ddr%.elf

call :flash_image xbl_b firmwarexbl_lp%ddr%.elf

call :flash_image xbl_config_b firmwarexbl_config_lp%ddr%.elf

:: ====================== flash: abl ====================

call :flash_image abl_a abl.elf

call :flash_image abl_b abl.elf

:: ==================== flash: aop ======================

call :flash_image aop_a firmwareaop.mbn

call :flash_image aop_b firmwareaop.mbn

:: ==================== flash: TZ =======================

call :flash_image tz_a firmwaretz.mbn

call :flash_image tz_b firmwaretz.mbn

:: ==================== flash: hyp ======================

call :flash_image hyp_a firmwarehyp.mbn

call :flash_image hyp_b firmwarehyp.mbn

:: ================== flash: Modem ======================

call :flash_image modem_a firmwareNON-HLOS.bin

call :flash_image modem_b firmwareNON-HLOS.bin

:: ================ flash: bluetooth ====================

call :flash_image bluetooth_a firmwareBTFM.bin

call :flash_image bluetooth_b firmwareBTFM.bin

:: ===================== flash: dsp =====================

call :flash_image dsp_a firmwaredspso.bin

call :flash_image dsp_b firmwaredspso.bin

:: ================= flash: keymaster ===================

call :flash_image keymaster_a firmwarekm4.mbn

call :flash_image keymaster_b firmwarekm4.mbn

:: =================== erase: misc ======================

call :erase_partition misc

:: =================== erase: ssd =======================

call :erase_partition ssd

:: ================= erase: keystore ====================

call :erase_partition keystore

:: ================ flash: apdp & spunvm ================

::call :flash_image apdp apdp.mbn

call :flash_image spunvm firmwarespunvm.bin

:: ================ flash: batinfo================

::call :flash_image batinfo batinfo.img

:: ================ flash: ADF ================

::call :flash_image ADF ADF.img

:: ================ flash: ADF ================

::call :flash_image APD APD.img

:: ================ flash: asdf================

call :flash_image asdf asdf_128M.img

:: =============== flash: XROM ================

call :flash_image xrom_a ASUS-xrom.img

call :flash_image xrom_b ASUS-xrom.img

:: ================== flash: devcfg =====================

call :flash_image devcfg_a firmwaredevcfg.mbn

call :flash_image devcfg_b firmwaredevcfg.mbn

:: ============= flash: cmnlib & cmnlib64 ===============

call :flash_image cmnlib_a firmwarecmnlib.mbn

call :flash_image cmnlib_b firmwarecmnlib.mbn

call :flash_image cmnlib64_a firmwarecmnlib64.mbn

call :flash_image cmnlib64_b firmwarecmnlib64.mbn

:: ==================== flash: qupfw ====================

call :flash_image qupfw_a firmwarequpv3fw.elf

call :flash_image qupfw_b firmwarequpv3fw.elf

:: ==================== flash: logfs ====================

call :flash_image logfs firmware/logfs_ufs_8mb.bin

:: ================= flash: uefisecapp ==================

call :flash_image uefisecapp_a firmwareuefi_sec.mbn

call :flash_image uefisecapp_b firmwareuefi_sec.mbn

:: ================ flash: featenabler ==================

call :flash_image featenabler_a firmwarefeatenabler.mbn

call :flash_image featenabler_b firmwarefeatenabler.mbn

:: =================== flash: imagefv ===================

call :flash_image imagefv_a firmwareimagefv_lp%ddr%.elf

call :flash_image imagefv_b firmwareimagefv_lp%ddr%.elf

:: ==================== flash: vbmeta ===================

call :flash_image vbmeta_a vbmeta.img

call :flash_image vbmeta_b vbmeta.img

:: =================== flash: recovery ==================

call :flash_image recovery_a recovery.img

call :flash_image recovery_b recovery.img

:: =============== flash: vbmeta_system =================

call :flash_image vbmeta_system_a vbmeta_system.img

call :flash_image vbmeta_system_b vbmeta_system.img

:: ==================== flash: Kernel ===================

call :flash_image boot_a boot.img

call :flash_image boot_b boot.img

:: ====================== flash: dtbo ===================

call :flash_image dtbo_a dtbo.img

call :flash_image dtbo_b dtbo.img

:: ===================== flash: super ===================

call :flash_image super super.img

:: ================= erase: userdata ====================

if “%1” equ “1” (

%FASTBOOT% -w

%FASTBOOT% erase asuskey

) else (

echo “don’t erase userdate”

)

:: ==================== reset active ====================

:: ====================== finished ======================

echo =======================

echo “Download_PASS”

echo =======================

goto :eof

:failure_prompt

if “x%1” neq “x0” (

call :color_text 0c “%2 flash failed,press any key to exit the script! ” & echo,

pause

exit 1

) else (

call :color_text 0a “%2 flash succeed!” & echo,

)

goto :eof

:flash_image

echo “Start Flash %1”

%FASTBOOT% erase %1 > nul 2>&1

%FASTBOOT% flash %1 %2

call :failure_prompt !errorlevel! %1

goto :eof

:erase_partition

echo “Start erase %1”

%FASTBOOT% erase %1 > nul 2>&1

call :failure_prompt !errorlevel! %1

goto :eof

:color_text

::echo off

<nul set /p “.=%DEL%” > “%~2”

findstr /v /a:%1 /R “^$” “%~2” nul

del “%~2” > nul 2>&1

goto :eof

================
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