diff --git a/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat b/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat index 2e88f79c7a46c43c992bb620b2d7271870c99b51..2b256e7500a201d8a295996ab59d7a6f3afdd123 100755 --- a/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat +++ b/flash-scripts/windows/Teracube_2e-install-from-bootloader.bat @@ -61,7 +61,7 @@ if not defined %JAVA_FOLDER_PATH ( ) set FASTBOOT_PATH="%FASTBOOT_FOLDER_PATH%fastboot" - +set ADB_PATH="%FASTBOOT_FOLDER_PATH%adb" set JAR_PATH="%JAVA_FOLDER_PATH%/bin/jar" @@ -93,12 +93,6 @@ if errorLevel 1 ( exit /b 12 ) ping 127.0.0.1 -n 1 -w 10000 >NUL echo "Flashed boot" -%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img -if errorLevel 1 ( exit /b 13 ) - -ping 127.0.0.1 -n 1 -w 10000 >NUL -echo "Flashed recovery" - %FASTBOOT_PATH% -s %DEVICE_ID% flash vbmeta vbmeta.img if errorLevel 1 ( exit /b 14 ) @@ -138,4 +132,17 @@ if errorLevel 1 ( exit /b 20 ) ping 127.0.0.1 -n 1 -w 10000 >NUL echo "Flashed vendor" + + +%ADB_PATH% -s %DEVICE_ID% reboot bootloader +if errorLevel 1 ( exit /b 20 ) + +ping 127.0.0.1 -n 7 -w 10000 >NUL +echo "reboot into bootloader" + +%FASTBOOT_PATH% -s %DEVICE_ID% flash recovery recovery.img +if errorLevel 1 ( exit /b 13 ) + +ping 127.0.0.1 -n 1 -w 10000 >NUL +echo "Flashed recovery" exit /b 0 \ No newline at end of file