Skip to content

Instantly share code, notes, and snippets.

@gasolin
Last active July 15, 2023 10:13
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gasolin/9300f5f9276b2df884c80da3e2c54ffc to your computer and use it in GitHub Desktop.
Save gasolin/9300f5f9276b2df884c80da3e2c54ffc to your computer and use it in GitHub Desktop.
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
Copy link

cemo commented Oct 2, 2019

How can I check that HAXM is working properly?

@gasolin
Copy link
Author

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
Copy link

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