Skip to content

Instantly share code, notes, and snippets.

@dclowd9901
Created May 7, 2015 16:49
Show Gist options
  • Save dclowd9901/5f8d8d1da35a7e225f29 to your computer and use it in GitHub Desktop.
Save dclowd9901/5f8d8d1da35a7e225f29 to your computer and use it in GitHub Desktop.
Copy Hosts to Genymotion Android
ip="$(ifconfig | grep -A 1 'en0' | tail -1 | cut -d ':' -f 2 | cut -d ' ' -f 2)"
/Applications/Genymotion.app/Contents/MacOS/tools/adb root
/Applications/Genymotion.app/Contents/MacOS/tools/adb remount
cat /etc/hosts|sed 's/127.0.0.1/'$ip'/' > /tmp/hosts-adb
/Applications/Genymotion.app/Contents/MacOS/tools/adb push /tmp/hosts-adb /system/etc/hosts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment