Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install Android Simulator

Install Android SDK on macOS

Install homebrew https://brew.sh/

brew cask install adoptopenjdk8
brew cask install android-sdk

add path in ~/.bash_profile

export ANDROID_HOME=/usr/local/share/android-sdk
export PATH=$PATH:$ANDROID_HOME/platform-tools/:$ANDROID_HOME/emulator

Download related packages

sdkmanager --no_https --install emulator
sdkmanager --no_https --install platform-tools
sdkmanager --no_https --install 'system-images;android-29;google_apis_playstore;x86_64'
sdkmanager --no_https --install 'extras;intel;Hardware_Accelerated_Execution_Manager'
sdkmanager --update
sdkmanager --list

Create a visual device (AVD) via avdmanager command

avdmanager list (find device skin id, lets use pixel 17)
avdmanager create avd -f -n test -d 17 -k 'system-images;android-29;google_apis_playstore;x86_64'
avdmanager list avd (or emulator -list-avds)

Run AVD

/usr/local/share/android-sdk/emulator/emulator -avd test

Reference

https://gist.github.com/agrcrobles/165ac477a9ee51198f4a870c723cd441

  • Install Android SDK on Linux

https://linoxide.com/linux-how-to/install-android-sdk-manager-ubuntu/ But use sudo apt-get install openjdk-8-jdk

Delete avd

avdmanager delete avd -n test

@cemo

This comment has been minimized.

Copy link

@cemo cemo commented Oct 2, 2019

How can I check that HAXM is working properly?

@gasolin

This comment has been minimized.

Copy link
Owner Author

@gasolin gasolin commented Oct 3, 2019

@cemo you will see the significant emulator speed boost if you installed HAXM (of course you need intel CPU)

@cemo

This comment has been minimized.

Copy link

@cemo cemo commented Oct 21, 2019

@gasolin I had a chance a fresh mac to install everything from scratch. Here is polished and updated gist of you
https://gist.github.com/cemo/02244e9c2c78e4ea7c285305c16411bf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment