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.