Block ads in apps on Android (including video ads)
Ads on websites and in apps are annoying enough, but apps that pop up a 30 second video ad while you’re going about your business are much harder to put up with. While there’s browsers that block ads on the web, in-app ads are tougher to eliminate. But it’s possible on Android, without root access to your phone.
“But wait! Isn’t that like stealing the app?” you cry. Well, maybe in a sense. When an app has gone from using harmless banner ads to showing a 30-second, loud, obnoxious video ad for a kid’s video game you’ll never play, I’d suggest it’s fair to block it. But try to support the developer by buying the full version or giving them a donation.
I’ve forgotten what ads look like
I’ve been using this method to keep ads off my Android phone for years now, and I find it impossible to go back. Every app (and website) is now a breeze to use, doesn’t shove obnoxious ads in my face, and my sanity has returned. It even uses less battery and data, because the ads won’t be downloaded and played.
The easy way
We used to recommend DNS66 as the go-to solution for blocking ads on Android, and it’s a great, customizable, open-source solution, but there’s an easier way as of 2021, and it’s an incredible app that works amazingly well. It’s also open source and free.
Blokada recently released version 5 of their app, and it’s incredible. The previous version could be slow and occasionally unreliable, but the latest version works without a hitch and is as speedy as you like.
Apart from the obvious feature of stopping ads on websites and apps, it also shows you a list of requests your phone has made, allowing you to easily block or unblock individual websites. This easy customizability makes it simple to block something that got through the filter list, or allow a request that gets blocked but is needed for an app to run correctly.
There’s a light version of Blokada on the Play Store but we recommend getting it from their website, or better yet through the open source app repository, F-Droid.
Get Blokada 5 on the Blokada website
If Blokada 5 isn’t for you
If for some reason you can’t use Blokada 5, we don’t strongly recommend Blokada 4 as we found it buggy enough to be an irritation, but it is easier to set up than DNS66. It’s still available on the Blokada website. Or you can try the light version, “Blokada Slim” on the Play Store.
For everyone else, we recommend DNS66 - it takes a few minutes to set up.
The DNS66 method
This is how it works. Every time an app tries to request data from the internet, it gets funnelled through what’s called a VPN - a virtual private network. But this is a special VPN: it doesn’t let apps request data from ad companies.
Let’s get you set up. It’ll only take a few minutes.
1. Allow side-loading apps
If you haven’t before, you might need to tell your phone to allow you to install apps from outside the Play Store. This is called side-loading. To allow it, go to Settings, Security (or “Lock screen and security” on Samsung), and enable the setting called “Unknown sources”.
This lets you install apps from files called APK files, which have the file extension .apk. Be careful which apps you install though.
2. Install the DNS66 app
This is a free, open source app. Open source is important here because all your network requests will go through this app, and we need to make sure we can trust it. Because the app is open source, if it was doing anything shady, it would be found out. You can read up about what open source means to learn more.
You can download DNS66 from F-Droid, which is like the Play Store but for open source apps. You can download DNS66 here.
You can either install F-Droid and install DNS66 from it, or you can download it and install it directly as an APK file. If you downloaded the APK file, just open it to install it. You might need to find the .apk file in your Downloads folder.
3. Set up hosts to block
DNS66 uses lists of sites to block called hosts files. DNS66 is handy because it includes well known hosts files that are kept up to date with new ad companies to block as they appear.
These hosts files tend not to include the ad companies that show video ads inside your apps, so if you’re keen to block those, you’ll need to download a hosts file we’ve prepared, and add that to DNS66. Don’t worry, it’s easy.
First download this video ads hosts file to your device. You might need to press on the link and hold and tap “Download link”. We prepared it ourselves by running some common apps, hunting down where the video ads are coming from, and adding them to the list. We might not have got them all, so let us know in the comments if you encounter an ad (and what app you saw it in).
Now go into DNS66, go to the Hosts tab, tap the plus (➕) icon in the bottom right to add a new hosts file. Enter any title you like such as “Video ads”. Then for the location, click the little paperclip symbol and select the “unlikekinds-video-ads-hosts” file you downloaded earlier. Then tap the tick in the top right.
Before you start blocking ads, you’ll need to open DNS66 and tap the Refresh host files button (the circle arrow in the top right). This will refresh all the other hosts files. Remember they’re kept up to date, which means the lists need to be downloaded every now and then. DNS66 will do this automatically.
4. Enable ad blocking
Now all you have to do is go to the Start tab in DNS66 and tap the big START button at the bottom, and you’re set!
Try opening up an app with ads in it, and they should be gone.
Wait, I still saw an ad!
This can happen from time to time, like if a new ad company comes out that hasn’t made it into a hosts file, or if they started using a new address.
If you see a video ad, let me know in the comments and I’ll add it to the hosts file. Or if you’re really savvy, you can track down the address and add it on your own.
Support app developers
It’s important that free apps continue to be made, and app developers need money to go on doing what they do. So if you can’t stand ads in your apps, try to support them in another way, by making a donation or paying a few bucks for the full version of their app.
After all, if everyone blocked ads, there wouldn’t be free apps anymore. But if the ads are really time consuming or obnoxious, we think you should block them, guilt free.
Share your thoughts, post a comment
Good thing is DNS66 is now available on the google play store!
Hey, could you explain how you find the host files for the ads you block? I’ve tried to find out on my own but to no avail. For example, lets say I want to block all ‘Lords mobile’ ads from my phone, how would I go about finding the host files for their domain? Thanks in advance.
Hey! Good question, that’s a tricky part of the process.
The way I did it was to record the logs my phone makes, open an app that shows unwanted ads, and search the logs for messages from the app.
They usually put messages in the logs about requesting and downloading ads, including where the ads come from.
You can view the logs of the phone using apps like SysLog or using Logcat.
Hope that helps :)
Am I correct that only 1 VPN can be active at a time? I have 22.214.171.124 installed to use the CloudFlare DNS service. It is a VPN redirecting DNS requests. I’m guessing I can use DNS66 to direct DNS to 126.96.36.199?
You’re correct, as far as I can tell you have to choose 1 VPN.
DNS66 however allows you to specify which DNS service is used for requests it allows, there’s a DNS tab in the app, and CloudFlare’s DNS service is listed by default.
I haven’t tried it myself but I assume you just have to check the CloudFlare box on the DNS tab.
What do you think of using AdGuard DNS? Or do you know an open-source alternative that is easy to setup (e.g. not pi-hole)?
(Also I noticed you are using googletagmanager, blocked by uBlock Origin, on this site)
In my experience, the ad host lists don’t include video ad providers, that’s why I prepared a separate list of them.
As far as I can tell, you can’t customise which hosts AdGuard blocks, but if they block everything you need, then by all means.
As for Google Tag Manager, analytics are essential on the web. You’re very welcome to block it. :)
Admittedly this is a shameless plug, though by no means an irrelevant one. I recently took what I’ve been doing for my own personal ad blocking on mobile and turned it into a little service called blockerdns (.com if anyone’s interested). I was already blocking ads for years at home by running my own DNS server with a big blocked domains file, and also ran a VPN on a DNS server that I set up on GCP that I would use for mobile blocking. But I always disliked the VPN method because of overhead, etc., so when Android 9 introduced a private DNS setting (which utilizes DNS-over-TLS) I jumped on it and added TLS tunneling to my server and have been blocking ads that way on mobile since last year. And the private DNS setting is phone-wide, so it covers all my apps and browsing. Again, this is a plug I know, but hey, any reader here that’s so inclined can just do the same thing I did and run this sort of system for themselves :)