@echo off

cd files

echo ' 
echo '
echo ' Connect your ZenFone 6 with your computer and prepare to UN-ROOT
echo '
echo ' !!! DO NOT DISCONNECT USB CABLE WHILE ROOTING !!!
echo '
echo '
pause

adb wait-for-devices
adb reboot bootloader
sleep 20

echo '
echo '
echo ' Unlocking bootloader ..
echo '
echo '
fastboot flash dnx dnx_fwr_ctp_a600cg.bin
fastboot flash ifwi ifwi_ctp_a600cg_unlock.bin
fastboot reboot-bootloader
sleep 20

echo '
echo '
echo ' Flash recovery with UN-ROOT process and do the dirty job
echo ' The phone will be rebooted twice, please be patient ..
echo '
echo '
fastboot flash recovery recovery-unroot.img
sleep 5
fastboot flash update dummy.zip

adb wait-for-devices
adb reboot bootloader
sleep 20

echo '
echo '
echo ' Flash official recovery and re-lock bootloader for future OTA upgrade
echo '
echo '
fastboot flash recovery recovery-zenfone6.img
sleep 5
fastboot flash dnx dnx_fwr_ctp_a600cg.bin
fastboot flash ifwi ifwi_ctp_a600cg.bin

echo '
echo '
echo ' All done, your ZenFone 6 is UN-ROOT :)
echo ' by shakalaca (http://23pin.logdown.com)
echo '
echo '
fastboot reboot
pause
