Are there any applications that attempt to block ads in applications? It seems that it should be theoreticaly possible, by blocking web requests to certain sites, for example.
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.
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).
To disable ads, you have to understand where the ads actually come from. There are easy-to-identify ad servers, and those can be easily avoided by editing your hosts file (you can edit hosts file on a rooted phone through ES file manager, or from a terminal session be it local or from your laptop/desktop).
But when the ad servers keep having random subdomains, that can be a real chore to keep chasing those updated servers. There are applications (previously mentioned) that help to ease that task--but it still is the same solution of getting hit with ads--and then blocking the new servers. None of those methods work if the ip address gets hardcoded in. That is the trump card.
Another option is to enable a firewall that denies ANY traffic for a specific application. That means: updates, ads, pushing your stats, etc...don't use your data plan and don't tie up your phone. Avast! Mobile security (free on marketplace or Play) gives you granular control when you want it. I have used Avast on desktops and servers, and run it on rooted Gingerbread and CyanogenMod9 (ICS). Very good appl.
Adblock Plus is now available for Android.
Here's a snippet from Lifehacker's review:
If you love Adblock Plus on the desktop, now you can take it with you on your Android phone. Adblock Plus for Android blocks ads on sites while you browse and even suppresses ads inside of ad-supported applications. Best of all, it's completely free.
Adblock Plus for Android doesn't require root access to your phone to suppress ads, but works best if your device is rooted. If you're rooted, it'll suppress ads over 3G/4G and Wi-Fi with no additional configuration required. If you're not rooted and you're running Ice Cream Sandwich, it'll block ads over Wi-Fi but not 3G/4G. If your device is running Gingerbread or earlier, you'll have to set up Adblock's proxy manually to get it to work. Speaking of proxies, that's how Adblock Plus for Android manages to strip out all of those ads: it routes all of your traffic through their servers, and removes the ads before it gets to your phone.
Aside from the DNS / IP address-based ad blockers, I'd also recommend MinMinGuard (requires a rooted phone and the Xposed Framework). It features API-based blocking, where function calls provided by the advertisement network SDK are blocked.
MinMinGuard is an Ad-remover made with Xposed Framework for Android. MinMinGuard can completely remove both the ads inside apps and the empty space caused by those ads. Conventional ads removing apps are only able to block the ad content, but the space taken by the ad will still remain unused (black). MinMinGuard successfully removes that black space, which extends the app window and makes your user-experience better!
- Totally remove the advertisement. You can notice that AdBlock and AdAway only stops showing the ad content, but it can not remove the empty field that was originally taken by the ad. MinMinGuard can totally remove the empty field!
- Lightweight. Alternative ad removing apps (AdBlock etc) constantly run a background VPN service, which puts a heavy loading on the system. MinMinGuard does not need to run a VPN service, so it saves system resources and, thus, extends the battery life.
- Per App Setting. MinMinGuard lets you choose which apps you want to remove ads from. If you only want to remove ads from several apps, MinMinGuard is your best solution.
The latest Android Market app (I have 3.15 which is the first time I've noticed the option) has an option to allow you to prevent Google or AdMob ads from tracking you and personalizing the ads to your interests. If that's all you want to stop, then it's just a tickbox away.
Open the Market app, pressMenu scroll down to the Other Settings heading where you should see:
Google AdMob Ads: personalize ads based on my interests
Choose whether to personalize ads from Google and AdMob in mobile apps on this device. Learn more
Just remove the tick from that tickbox to:
If you opt-out, your device identifier information will not be used by Google for advertising going forward and you will not receive ads based on your interests or inferred demographics.
Although incomplete I have a solution in place that is sufficient for me. I have configured the dnsmasq dns server in my lan to serve 0.0.0.0 as the response to a specified set of advertising hostnames.
The pro is that I have one solution that fixes this for both my tablet and my phone without the need to root either of them. The con is that it only works at home on my wifi.
I had similar problem before and non of the existing apps could solve my problems, furthermore I cannot root my company phone due policy. Then I realized that you can configure proxy for each and every connection (wifi and 4g) separately. So I installed a squid, configured to block most of the annoying ad sites and deployed in docker. Long story short:
docker run -d -p 3128:3128 --name squid-adblock andrassebo/squid-adblock
Then configure the proxy on your phone to use the hosting machines IP address and 3128 as port.