naeemqaswar
9/24/2019 - 10:38 AM

Run Android Emulator from CLI

1. Add following lines to "/root/.bashrc" or "/root/.bash_profile" and replace "[username]" to your profile username.
"export ANDROID_SDK_ROOT=/Users/[username]/Library/Android/sdk"
"export PATH=$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$PATH"

2. Run command "exec bash" to reload bash.

3. Now run android emulator using following command:
"emulator -avd Android_TV_1080p_API_28"

4. In case you don't know the name of your VM installed, run command "emulator -list-avds" to see the list.
List android emulators: emulator -list-avds

Run emulator:
- cd /Users/naeemqaswar/Library/Android/sdk/emulator
- ./emulator -avd Pixel_4a_API_31