Skip to content

Instantly share code, notes, and snippets.

@ivandoric
Created February 26, 2015 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivandoric/322d04863f41a7377148 to your computer and use it in GitHub Desktop.
Save ivandoric/322d04863f41a7377148 to your computer and use it in GitHub Desktop.
android: Using Android Emulator with virtual hosts
1. Copy /etc/hosts somewhere etc. /Users/username/AndroidHosts
2. Change copied hosts file so that you have 10.0.2.2 instead of 127.0.0.1 for every one of your virtual hosts
3. Start your emulator from Google SDK
4. When Emulator starts execute these commands
$ adb remount
$ adb push /Users/username/AndroidHosts/hosts /system/etc/
Virtual hosts should work now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment