高通批处理脚本求指点
bat吧
全部回复
仅看楼主
level 1
这是我目前刷机用的一个脚本,但是一次只能刷一台手机,请问怎么改成批量刷机,一次刷多个机子?求大佬指点一下~万分感谢~
@璐村惂鐢ㄦ埛_000076K馃惥 off
setlocal
:: wmic /format:list strips trailing spaces (at least for path win32_pnpentity)
for /f "tokens=1* delims==" %%I in ('wmic path win32_pnpentity get caption /format:list ^| find "COM"') do (
call :setCOM "%%~J"
)
:: display all _COM* variables
set EMMC
if DEFINED EMMCDLCOMPORT (Echo "Port Definited =%EMMCDLCOMPORT%") else (goto :usage)
@echo on
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram1.xml -Memoryname UFS
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram1.xml -Memoryname UFS -SetActivePartition 1
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram2.xml -Memoryname UFS
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram3.xml -Memoryname UFS
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram4.xml -Memoryname UFS
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x rawprogram5.xml -Memoryname UFS
emmcdl.exe -p %EMMCDLCOMPORT% -f prog_firehose_ddr.elf -x WDFlash.xml -Memoryname UFS
@echo off
Echo "Flashing completed. Put device out of EDL Mode"
:: end main batch
goto :EOF
:usage
echo Unable to find devices in EMMCDL mode.. Exitting
:setCOM <WMIC_output_line>
:: sets _COM#=line
setlocal
set "str=%~1"
set "num=%str:*(COM=%"
set "num=%num:)=%"
set str=%str:(COM=&rem.%
echo.%str%|findstr /C:"Qualcomm" >nul 2>&1
if not errorlevel 1 (
endlocal & set "EMMCDLCOMPORT=COM%num%"
)
goto :EOF
2020年06月11日 12点06分 1
1