echo( echo Searching for a compatible device... :: Ensure that we are flashing right device :: :: H9436 :: H9436 @call :devices if not "%serialnumbers%" == "" GOTO no_error_serialnumbers :: If fastboot devices does not list any devices, then we cannot flash. echo( echo We did not find any devices with fastboot. echo( echo The device is not properly connected to your computer or echo you might be missing the required windows fastboot drivers for your device. echo( echo Go to the Windows Device Manager and verify that the fastboot driver for the echo device is properly installed. echo( pause exit /b 1 :no_error_serialnumbers for %%d in ( %serialnumbers% ) do ( set fastbootcmd=%fastbootcmd_no_device% -s %%d @call :getvar product findstr /R ":: H9436 :: H9436" %tmpflashfile% >NUL 2>NUL if not errorlevel 1 ( call :new_product_found %%d ) ) if not [%products%] == [] goto :no_error_product echo( echo The DEVICE this flashing script is meant for WAS NOT FOUND! echo( echo This script found following device: type %tmpflashfile% pause exit /b 1 :no_error_product if "%products%" == "%products: =%" GOTO :no_multiple_products echo( echo It seems that there are multiple compatible devices connected in fastboot mode. echo Make sure only the device that you intend to flash is connected. pause exit /b 1 :no_multiple_products :: Now we know which device we need to flash set fastbootcmd=%fastbootcmd_no_device% -s %products% :: Check that device has been unlocked @call :getvar secure findstr /R /C:"secure: no" %tmpflashfile% >NUL 2>NUL if not errorlevel 1 GOTO no_error_unlock echo( echo This device has not been unlocked for the flashing. Please follow the echo instructions how to unlock your device at the following webpage: echo %unlockwebsite% echo( echo Press enter to open browser with the webpage. echo( pause start "" %unlockwebsite% exit /b 1 :no_error_unlock echo( echo The device is unlocked for the flashing process. Continuing..