Created
September 1, 2021 15:33
-
-
Save reggiegutter/b2325af15149b7b54225606d98c3d861 to your computer and use it in GitHub Desktop.
Run AVD from terminal in windows machines
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
@echo off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
SET count=0 | |
FOR /F "tokens=* USEBACKQ" %%F IN (`%ANDROID_HOME%\emulator\emulator.exe -list-avds`) DO ( | |
SET /a count=!count!+1 | |
SET var!count!=%%F | |
) | |
for /l %%i in (1,1,%count%) do echo %%i) !var%%i! | |
@echo digit number of virtual machine to run or 'q' to quit | |
set /p choice="" | |
if "%choice%"=="q" goto end | |
@echo !var%choice%! | |
%ANDROID_HOME%\emulator\emulator.exe -avd !var%choice%! | |
:end | |
ENDLOCAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment