In this post, we will see how to open android virtual device or avd with out opening android studio editor.
Prerequisites
Make sure you have downloaded Android SDK CLI or android studio. if not, then refer to android sdk download and setup
Perform all the steps including the environmental setup.
let’s get started to know how to launch the AVD without android studio –
List out all available emulators in terminal
Navigate to the emulator folder under Android SDK [Where you have downloaded android SDK], like for me emulators folder is under
/Users/<UserName>/Library/Android/sdk/emulator
OR
have the emulator path setup in environmental file in mac or env variable in windows, so you need not to care about the emulator path
export ANDROID_SDK_ROOT=/Users/MyUser/Library/Android/sdk
Append PATH variable with the emulator and then tools path, as below [shown for MacOS]
export $PATH:$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tool:$ANDROID_SDK_ROOT/platform-tools
Note : ANDROID_HOME is replaced by ANDROID_SDK_ROOT
Open cmd [for windows OS] or terminal [for MAC OS]
emulator -list-avds
pixelxlapi26
As you can see, the above command returns available emulators. [showing one result, as only one device is available]
Open specific emulator
Enter below command
emulator -avd <deviceName>
In my case, I should run the command
emulator -avd pixelxlapi26
this will pop up avd / android emulator
Hope that helps!
1 Comment