I ran into the same problem and made it work.
Run emulator:
emulator -avd <EMULATORNAME> -partition-size 512 -writable-system
I believe -writable-systemparam is what fixed it for me.
In another terminal prompt / cmd:
adb root
adb -s emulator-5554 remount
adb -s emulator-5554 pull /system/etc/hosts hosts
Now earn your magic (add the IP file to the host)
adb -s emulator-5554 push hosts /system/etc/hosts
Additional Information:
- emulator-5554 - device name, you can find it using
adb devices - The emulator program is inside android-sdk / tools
- adb- android-sdk/platform-tools
:
, steven adb reboot adb root.
AVD.
adb reboot , .
:)