Android: Host File Edit

Before continuing, make sure that

  • Phone is rooted

  • USB debugging is enabled

adb kill-server
adb push hosts /mnt/sdcard/Download
adb shell
su
mount -o rw,remount /system
rm -f /system/etc/hosts
cp /mnt/sdcard/Download/hosts /system/etc/
chmod 0644 /system/etc/hosts
mount -o ro,remount /system