bat 处理adb脚本
Posted liuzhipenglove
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了bat 处理adb脚本相关的知识,希望对你有一定的参考价值。
@echo off REM Funtion: 测试parsermode 接口CdxParserGetMediaInfo 和CdxParserRead REM Code by lzp 2017-05-02 [[email protected]] cls title pasertest :MediaInfo color 0A echo . echo = = = = = = = = = = = = = = = = = = = = = = echo Please select the type of source, and enter echo = = = = = = = = = = = = = = = = = = = = = = echo . echo 1. Diff Pack echo . echo 2. Diff Code echo . echo 3. Diff Ratio echo . echo 4. MultiSub echo . echo 5. MultiSound echo . echo 6. Other :Start set select= echo . set /p select= please select Type: IF NOT "%select%"=="" set select=%select:~0,1% if /i "%select%"=="1" goto PACK if /i "%select%"=="2" goto CODE if /i "%select%"=="3" goto RATIO if /i "%select%"=="4" goto MULTISUB if /i "%select%"=="5" goto MultiSound if /i "%select%"=="6" goto OTHER echo Type is invalid, Please Reenter! echo . goto Start :PACK cd /d D:\parsertest\source\pack goto TEST :CODE cd /d D:\parsertest\source\code goto TEST :RATIO cd /d D:\parsertest\source\ratio goto TEST :MULTISUB cd /d D:\parsertest\source\mutilsub goto TEST :TEST setlocal enabledelayedexpansion for /f "skip=1 tokens=1,2,3,4,5,6" %%i IN (source.txt) do ( set "FILE_INPUT=%%i" set "FILE_SAVE_RESULT=%%j" set "DATA_REFER_LOCAL=%%k" set "REMOTE_SAVE_REFER_PATH=%%l" set "REMOTE_DATA_REFER=%%m" set "FILE_TEST_RESULT=%%n" echo . echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo 1. delete mediaInfo.dat echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo . echo rm -rf !FILE_SAVE_RESULT!>tmp.txt echo exit>>tmp.txt adb -s 20080411 shell<tmp.txt ping -n 1 127.0.0.1>null echo . echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo 2. Test CdxParserGetMediaInfo And CdxParserRead echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo . echo /system/bin/paserdemo -n 1 -i !FILE_INPUT! -me !FILE_SAVE_RESULT! >tmp.txt echo /system/bin/paserdemo -n 2 -i !FILE_INPUT! -md !FILE_SAVE_RESULT! >>tmp.txt echo exit>>tmp.txt adb -s 20080411 shell<tmp.txt ping -n 5 127.0.0.1>null echo . echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo 3. push local refer data to remote(android) echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo . adb -s 20080411 push !DATA_REFER_LOCAL! !REMOTE_SAVE_REFER_PATH! ping -n 5 127.0.0.1>null echo . echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo 4. cmp interface out(stream and mediaInfo) echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo !REMOTE_DATA_REFER! echo /system/bin/md5cmp !REMOTE_DATA_REFER! !FILE_SAVE_RESULT! >tmp.txt echo /system/bin/rm -rf !REMOTE_DATA_REFER! >>tmp.txt echo exit>>tmp.txt adb -s 20080411 shell<tmp.txt ping -n 3 127.0.0.1>null echo . echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo 5. pull result to local(windows) echo = = = = = = = = = = = = = = = = = = = = = = = = = = = echo . adb -s 20080411 pull /data/camera/md5CmpResult.txt C:move /Y C:\md5CmpResult.txt !FILE_TEST_RESULT! del tmp.txt ping -n 3 127.0.0.1>null ) endlocal pause exit 0
以上是关于bat 处理adb脚本的主要内容,如果未能解决你的问题,请参考以下文章
求问 BAT脚本如何自动执行 adb shell 以后的命令
躺平了,三分钟学bat脚本adb shell 执行命令 + bat脚本延时操作