I am trying to modify the hosts file in my android device without any rooting and after a quick search I came across this adb method to push hosts file to a non rooted device.

I followed all the instructions in the The non-root method section with developer mode enabled. But at the last command adb push F:\hosts /system/etc/ I am getting this error.

 adb: error: failed to copy 'F:\hosts' to '/system/etc/hosts': remote couldn't create file: Read-only file system

I tried adb reboot and adb remount but its showing this info Not running as root. Try "adb root" first.. How can I push the hosts file with out any rooting?

  • 1
    You can't in 99% of devices... but you never stated what device.
    – acejavelin
    Commented Sep 8, 2018 at 17:54
  • Possible duplicate of How best to block ads on non rooted phone?
    – Robert
    Commented Sep 9, 2018 at 10:28
  • Removed ads tag. The question was not about ad blocking alone but to push hosts file modification without root.
    – Eka
    Commented Sep 9, 2018 at 11:53

1 Answer 1


You cannot do this without root access. The instructions given in that link are conceptually wrong to begin with. The fact that he was able to push a file into system partition implies that he had elevated privilege to remount system partition and write into it. Clearly, the instructions cannot fit under "Non root method" category.

If you are into blocking ads through hosts file, you may try some answers here: In Android 6, how to deny an app permission to access the network?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .