Skip to content

Instantly share code, notes, and snippets.

@techanon
Created March 31, 2019 06:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techanon/3ce26e93238791cf2b2d86c42de92843 to your computer and use it in GitHub Desktop.
Save techanon/3ce26e93238791cf2b2d86c42de92843 to your computer and use it in GitHub Desktop.
Android Emulator boot cmd script
@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