You also can put the hosts file made for a Linux system into the mounted /system/etc/hosts, the system partition /system can be mounted on /mnt or /mnt/system too.
As you have root, or with just a custom recovery, you can change it, just going to the recovery, using adb in there and mounting the system partition as rw, then moving the hosts file to the mounted expected location.