Skip to content

Instantly share code, notes, and snippets.

@4levels
Created May 30, 2018 12:01
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 4levels/39792f2c75e5222a536ab5694bdfa4f0 to your computer and use it in GitHub Desktop.
Save 4levels/39792f2c75e5222a536ab5694bdfa4f0 to your computer and use it in GitHub Desktop.
Change Android emulator /etc/hosts file
# adb root
# adb remount
# adb shell
# 192.168.121.50 is the IP of a local bridged connection with fixed ip with kvm/qemu
# api-local.yourconfiguredvhost.com is the local domain used for testing, running on a vm on the host
echo "127.0.0.1 localhost\n::1 ip6-localhost\n192.168.121.50 api-local.yourconfiguredvhost.com" > /system/etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment