平时adb push 文件比较麻烦一些,可以使用下面的这段代码实现 一键push 省时省力
:: This is a batch script for batch adb push file processing.
:: Using @prefix to close the whole echo line
@ECHO off
ECHO Start batch adb pushing...
adb devices
:: Try capture ouput by command 'adb devices' to get serial number of devices
:: Handle multipe devices condition.
:: TBD
:: Set Destination
SET REMOTE=输入需要push的路径
:: Get current file name(e.g cpy_file.bat)
SET CURRENT_FILE=%~n0%~x0
::ECHO %CURRENT_FILE%
:: Set counter
SET total=0;
for %%f in (*) do (
:: Print all
ECHO %%f
:: Skip current bat file.
if "%%f"=="%CURRENT_FILE%" (
ECHO %CURRENT_FILE% filtered out.
)else (
SET /a total+=1
adb push %%f %REMOTE%
)
)
@ECHO:
ECHO Batch adb push file end,with %total% files total.
::adb shell
::cd %REMOTE%
::ls
PAUSE