A man using a smartphone
It’s possible to save your sanity, battery, and data by blocking ads in apps, on the web, and even video ads on Android.

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 a harmless banner ad to 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 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. If it weren’t for this hack, I’d have to switch to an iPhone, where ads are more rare.

It’s a little involved but well worth it

This is how it works. Every time an app tries to request data from the internet, it gets funneled 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.

Allow side-loading apps on Android

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.

Set up DNS66 hosts to block ads on Android

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.

Get the unlike kinds newsletter
An infrequent summary of top articles in your inbox

 

Comments

Share your thoughts, post a comment

1 Virbius - 6 months ago

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.

1 whalabi - 6 months ago

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 :)

1 GuyGordon - 7 months ago

Am I correct that only 1 VPN can be active at a time? I have 1.1.1.1 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 1.1.1.1?

1 whalabi - 7 months ago

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.

1 kind - 7 months ago

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)

1 whalabi - 7 months ago

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. :)

0 ebmat - 2 months ago

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 :)