-
-
Save michaelkmatific/f4f57cea9ccf09991c6b0ec0d9923972 to your computer and use it in GitHub Desktop.
script for issuing commands to multiple android devices on windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Inspired by Linux version of the same https://gist.github.com/christopherperry/3208109 | |
@echo off | |
SET ARGUMENTS=%~1 | |
if "%ARGUMENTS%" == "" ( | |
GOTO EOF | |
) | |
SET "ARGUMENTS=%ARGUMENTS:""="%" | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
:: INSTALL ON ALL ATTACHED DEVICES :: | |
FOR /F "tokens=1,2 skip=1" %%A IN ('adb devices') DO ( | |
SET IS_DEV=%%B | |
if "!IS_DEV!" == "device" ( | |
SET SERIAL=%%A | |
echo "adb -s !SERIAL! %ARGUMENTS%" | |
call adb -s !SERIAL! %ARGUMENTS% | |
) | |
) | |
ENDLOCAL | |
:EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment