The hosts file is resolved in preference to DNS requests, if the hosts file resolves the hostname, the request never leaves the device; this means the hosts file can be edited to block the domain names of ad servers, third party cookies, adware, spyware, ect…
AdAway (not available on Google Play) update the hosts file to blocks any pop-up that appears while you are browsing on your device: it needs Android >= 2.1 and root access.
The main features are:
- Choose your own sources of hosts files;
- Add exceptions to your Whitelist if an app is not working when specific hosts are blocked;
- Define extra hostnames in your own Blacklist;
- Add your own (hostname, IP)-pairs in the Redirection List.
If you use Chrome and still see ads on web pages, remember to disable the “data saver” or “reduced data usage” browser option.