adb push hosts /system/etc/That should push your host file back to system/etc folder. And you are done. Your host file is successfully changed.

You can cross verify your changes by logging into adb shell and viewing the host file.

For above step you will have to grant adb shell su privileges. It will prompt you on the device.

Finally you can test your changes by typing test.domain.com in your android browser. You may have to restart your phone to refresh DNS cache. It wont load because there is no server running with that URL. If you map facebook.com to this URL even facebook will not load.