Created
September 22, 2018 01:28
-
-
Save prachil007/3c8a45ca34308faafda1b41ef7d48216 to your computer and use it in GitHub Desktop.
Start android emulator from command line, especially when you don`t know the AVD name
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 | |
IF [%1]==[] (GOTO ExitWithPrompt) | |
set i=1 | |
FOR /F "delims=" %%i IN ('emulator -list-avds') DO ( | |
set /A i=i+1 | |
set em=%%i | |
if %i% == %1 ( | |
echo Starting %em% | |
emulator -avd %em% | |
EXIT /B 0 | |
) | |
) | |
GOTO :Exit | |
:ExitWithPrompt | |
emulator -list-avds | |
echo Please enter the emulator number to start | |
:Exit | |
EXIT /B 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment