Friday, August 17, 2012

Change or Restore /etc/hosts file for rooted android phone

If you have rooted your android phone, you can easily change the host file , like map some host to 127.0.0.1 , this will block the access to the url.

some application like ADfree did the same thing, basically adding a lot Ad domains and all pointed to 127.0.0.1.

image

you can check the url like http://www.mvps.org/winhelp2002/hosts.txt to get the Ad host lists.
sometimes, you may need to unblock some individual host which could be false positive. you need mount the file to be writable. since by default /etc/hosts is one system which is readonly/
image

to change it to writable. do the remount
image

now your can push change to this file

image

1 comment:

zproxy said...

I wish I could do this on a non rooted phone while running as a new wifi access point.

 
Locations of visitors to this page