title: How to edit /etc/hosts file in Android Studio emulator running in nougat?
body: <p>Anyone know how to edit /etc/hosts file inside an android studio emulator running in nougat? I will be editing it so I can use my virtual host in my local web server. I tried  editing it through terminal using adb however, it is returning Read-only file system. Tried also using chmod but still it fails.</p>
  
  <p>Update:
  I also tried pulling and pushing files using adb
  $ ./adb -s emulator-5554 push ~/Desktop/hosts /system/etc/hosts</p>
  
  <p>adb: error: failed to copy '/Users/Christian/Desktop/hosts' to '/system/etc/hosts': couldn't create file: Read-only file system</p>