1. You need to mount the android emulator's file system in read write mode.
2. Then upload the modified host entry to /system/etc/
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system #mount as rwHowever the changes does not seem to persist. So we need run this script every time we start the emulator.
adb push hosts /system/etc/ #where hosts file contain our modified host entries