Android - How to block ads in Android applications?

The most popular method is replacing the built-in hosts files with one that forces DNS queries to well-known ad servers to result in 127.0.0.1 (localhost). This effectively blocks most common ads, and most of the Google Ads in applications.

The downside is that applications can tell that ads are being blocked, and can either refuse to run or otherwise degrade their usefulness while the ad blocking is in effect.

Also, root access is required to replace the hosts file.

Beyond that, I haven't seen anything that can selectively block web requests for arbitrary apps. For some programs that only use internet access for ads, you could use a firewall app to prevent them from accessing the internet or -- if your ROM supports it (like the latest CyanogenMod) -- revoke the internet access permission from the app.

Again, root access is generally required to set up a system-wide app-level firewall or replace your ROM.


There are two different apps, AdFree Android and AdAway that block ads, theoretically in all applications. You must have a rooted phone in order to use these.

AdFree Android works by

...nullifying requests to known host names in the system hosts file.

which is essentially an automated solution of modifying the hosts file, brought up by another user here. It appears that Adaway does the same thing.

If you do not have a rooted phone, you can, at the very least, use the Firefox Browser with the Adblock Plus AddOn (installed via Firefox).


You can also use a firewall or permissions-limiting application (DroidWall or LBE Privacy Guard, for example) to limit internet access for particular applications. These also require root.

Tags:

Ads