Android Emulator(AVD) host file

hosts

hosts file is same as Linux system. In Android, /system/etc/hosts is hosts file.
This is for emulator, we cannot change real device(if you are root, you can do it!)

How to copy file to local machine

Use adb (platform-tools), to access emulator, you need to run emulator first.

adb remount
adb pull /system/etc/hosts/ c:\hosts

Replace

remount is needed before executing this command
If you want to edit, please be careful character encoding and line break.

adb push c:\hosts /system/etc/hosts

Check

adb shell 
cat /system/etc/hosts