Skip to content

Instantly share code, notes, and snippets.

@matthewblott
Last active January 18, 2022 12:31
Show Gist options
  • Save matthewblott/5e269041666c155b0aa75475ec967f61 to your computer and use it in GitHub Desktop.
Save matthewblott/5e269041666c155b0aa75475ec967f61 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# May need to run the following script for M1 machines:
# ~/Library/Android/sdk/emulator/darwin-aarch64-replace.sh
# For orientation to work the rotation setting on the device needs to be enabled
# create device
avdmanager create avd \
--name device-name \
--package "system-images;android-32;google_apis;arm64-v8a" \
--abi "google_apis/x86_64" \
--device "pixel_5"
# list available devices
avdmanager list avd
emulator -list-avds
# start device
emulator -avd device-name
# start device if it's not found PATH
~/Library/Android/sdk/emulator/emulator -avd device-name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment