批量安装脚本
@echo off
echo --------------------------------------------------------
echo Get devices
adb devices > devices.txt
echo --------------------------------------------------------
echo start install “apk的绝对路径”
for /f "skip=1 tokens=1 delims= " %%i in (devices.txt) do (
echo install to devices %%i
adb -s %%i install -r “apk的绝对路径”
)
del devices.txt
echo --------------------------------------------------------
pause
批量wifi连接adb脚本
@echo off
for %%a in (
10.224.242.81
10.224.242.79
...
) do (
echo %%a start run
adb connect %%a
echo %%a connect success!
)
pause
批量测试设备ip是否能ping通脚本
@echo off
setlocal enabledelayedexpansion
del result.txt
time/t>>result.txt
for /f "eol=;" %%f in (ip.txt) do (
ping -n 1 %%f
if !errorlevel! EQU 0 @echo %%f 成功>>result.txt
if !errorlevel! EQU 1 @echo %%f 失败>>result.txt
)
)
批量测试ip是否能平通,需要创建一个ip.txt文件,写入ip地址执行脚本即可,结果会显示在脚本生成的result.txt中