use the output automatically
Posted: 14 Oct 2019 07:33
We connect a smartphone to our computer.
automatically the smartphone get a random COM-port.
with this script we detect the correct PORT:
how is it possible automatically the use the correct PORT number and use it.
(because at the moment we have to type it in, manually by keyboard)
Thank you in advance!
automatically the smartphone get a random COM-port.
with this script we detect the correct PORT:
Code: Select all
@echo off
setlocal
title MSM8998 Boot Recovery Program
mode con cols=110 lines=40
set port=
:RETRY
color a
cls
echo.
mode
echo.
echo ¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë¡ë
set /p port=Input Port Number[1~300,x:Exit]:
if "%port%" == "x" goto EXIT
for /L %%a in (1,1,300) do (
IF "%port%" == "%%a" (
goto ChoiceOK
)
)
echo %port% is BAD!!
goto RETRY
goto ChoiceOK
:ChoiceOK
echo %port%
echo Start Recovery.
echo emmcdl.exe -p COM%port% -f prog_ufs_firehose_8998_ddr.elf -MemoryName ufs -SetActivePartition 1 -x rawprogram0.xml
emmcdl.exe -p COM%port% -f prog_ufs_firehose_8998_ddr.elf -MemoryName ufs -SetActivePartition 1 -x rawprogram0.xml
:EXIT
how is it possible automatically the use the correct PORT number and use it.
(because at the moment we have to type it in, manually by keyboard)
Thank you in advance!