Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
installing android emulator using cli on a mac

In your command line

brew cask install android-sdk
sdkmanager "emulator"
sdkmanager "platform-tools"
sdkmanager "system-images;android-26;google_apis;x86_64"
avdmanager create avd -n NAME -k "system-images;android-26;google_apis;x86_64" # the one that you use above

In your ~/.bashrc

export ANDROID_HOME="/usr/local/share/android-sdk"
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
export ANDROID_SDK_ROOT=$ANDROID_HOME
alias emu="$ANDROID_HOME/tools/emulator" # https://stackoverflow.com/a/43809095

In your command line

emu @NAME # the one you used above to create avd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.