1

I'm using Android Studio 2.1.2 on Mac OSX (El Capitan). I created an Android Virtual Device (Nexus 5, API 19) through the AVD Manager. I want this device to interact with my local apache server, as I test my new Android app. However, when I try to update the hosts file on the emulator, I keep getting "mount: Read-only file system" error, as I follow the instructions found in questions like this: How to change the hosts file on android and https://android.stackexchange.com/questions/60446/cant-remount-system-in-rw

I have tried all the suggestions given, but unable to push the hosts file to the emulator.

Has anyone ran into this and solved lately? If yes, kindly let me know how to address this. Thanks in advance.

Community
  • 1
  • 1
Parthi
  • 31
  • 3

1 Answers1

0

I've faced the same problem.To access hosts file in mobile/emulator it needs to be rooted.

So try using Genymotion emulator for android Mac which comes rooted by default. you can find genymotion for mac here : Genymotion for Mac

To access your host files follow : Modify hosts file in emulator

Rajan Kali
  • 12,627
  • 3
  • 25
  • 37