Configure hosts File in Android
Alright, today I would like to work a sample web site and browse it not only from my Android Emulator but also from my Android G1 device. Since I did not make the web site public yet, I need to play with "hosts" file in order to direct specific url to my specific intranet IP on Android browser. The steps that I follow to accomplish my goal are provided below; For Android Emulator; 1. From the terminal invoke the adb command with remount option otherwise you will get "failed to copy 'hosts' to '/system/etc/hosts': Read-only file system". adb remount 2. In the terminal pull the default hosts file from /system/etc/hosts or /etc/hosts which is the symlink of the file not only for backup purpose but also to get the file to modify. adb pull /system/etc/hosts /home/player/hostBackup/ 3. Get a copy of the the hosts file in your computer and modify it according to your needs. 4. Now we can push the file directly to the emulator. adb push /home/player/hostBack...
Comments