Skip to content

Instantly share code, notes, and snippets.

@lucymtc
Last active May 18, 2018 09:46
Show Gist options
  • Select an option

  • Save lucymtc/db00a275706ed971f82477ed648e4a20 to your computer and use it in GitHub Desktop.

Select an option

Save lucymtc/db00a275706ed971f82477ed648e4a20 to your computer and use it in GitHub Desktop.
Android emulator network connection with Vagrant IP
cd /Users/lucy/Library/Android/sdk
tools/emulator -avd Nexus_5X_API_23 -writable-system&
prepare file /tmp/hosts with contents:
127.0.0.1 localhost
::1 ip6-localhost
192.168.50.4 politico.test
Then execute:
adb root
adb remount
adb push /tmp/hosts /etc/hosts
After it will always need to be started using shell with "tools/emulator -avd Nexus_5X_API_23 -writable-system&", won't work with Android Studio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment