is there a way to run the emulator without starting the Android Studio first. Perhaps from the command line. I know that this feature was available in older versions and has
For Windows
In case anyone looking for shortcut / batch script - Gist - Download batch file.
@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
Usage
D:\>start-emulator
Nexus_5_API_26
Please enter the emulator number to start
D:\>start-emulator 1
Starting Nexus_5_API_26
HAX is working and emulator runs in fast virt mode.
If you are on windows, what about a shortcut ? It is very easy to place whatever you want ant the icon is descriptive and nice.
C:\Users\YOURUSERNAME\AppData\Local\Android\Sdk\tools\
@
in front (take a look at the picture below )now you can do whatever yhou want with that shortcut, put on the desktop, bind it to the start-menu or whatever
Assuming you have installed Android studio properly,Open a command prompt and type
emulator -list-avds
which will display all the devices and then type emulator @avd_name
where avd_name is the the name of your emulator installed.
(Only for Windows) Why to torture yourself? Make a Simple BAT file ! :
Here is the command:
cd /d yourSdkPath\emulator && emulator -avd yourAVDName
Example:
cd /d D:\Android_SDK\emulator && emulator -avd Nexus_5_API_28
The path for emulator is
/Users/<Username>/AppData/Local/Android/sdk/tools
For Windows users:
C:\Users\[yourusername]\AppData\Local\Android\Sdk\emulator
emulator.exe
and send as a shortcut to where you want.@
symbol.C:\Users\[yourusername]\AppData\Local\Android\Sdk\emulator\emulator.exe @EmulatorName