ealeng
Menu
← All posts

Jun 4, 2020 · 1 min read

Launch Android emulator on macOS using command line

Testing mobile applications I quite often have to launch Android emulator, there is an option to launch through Android Studio and then UI of AVD. Working in automation space I don’t want all…

test-automationdevopsmobile-testing

Testing mobile applications I quite often have to launch Android emulator, there is an option to launch through Android Studio and then UI of AVD. Working in automation space I don’t want all these manual steps, rather run the command line and launch the emulator. Here is how to do it.

First, add both Android SDK emulator and tools directories to the path

export ANDROID_SDK=$HOME/Library/Android/sdk
export PATH=$ANDROID_SDK/emulator:$ANDROID_SDK/tools:$PATH

Here is detailed stack overflow explanation.

Second, check list of available AVD names

emulator -list-avds

Third and last, launch the emulator

emulator @avd_name

Here is a detailed android developer article on how to start the emulator from the command line.

Learning something useful?

New labs, articles, and videos on evaluating and testing AI systems come out regularly. Follow along so you don't miss the next one.