Use personalDNSfilter to block advertisement on Android
Android device owners have a couple of options when it comes to blocking ads on their devices. One of the better options, as it is application independent and does not require root, is to use a DNS filter proxy.
The method works similarly to how hosts files work on computer systems. DNS is used to "translate" domain names to IP addresses that computers communicate with, and a hosts-based solution blocks access to known domain names by changing the information on the device.
personalDNSfilter for Android
The Android application personalDNSfilter blocks connections to known ad servers on devices running Android to block advertisement and other unwanted scripts from being downloaded and executed.
The application is offered as a compiled APK that is compatible with Android 4.2 or newer devices. You need to configure the device to accept installations from unknown sources as it is not installed through the Google Play store but independently.
Cautious users can check out the released source code of the application and use it to build the app from scratch.
The app sets up a new VPN connection that all traffic is routed trhough. The developer states that all filtering happens locally on the device.
Advertisement connections are blocked in all applications that you run on the device after installation of the personalDNSfilter. Please note that its needs to run in the background. If you plan to use it all the time you may enable the autostart option it comes with to have it started automatically so that it is ready for use whenever you use the device.
The application uses an ad server filter list with about 2500 entries by default. You can check it out with a click on this link. You can use other lists, more complete ones for instance or specialized ones, as well.
Simply enable advanced settings in the application's interface and add your own hosts file lists so that any list you add is used by the application.
You can disable the blocking of advertisement in the interface temporarily; useful if you need to access a site, application or service that refuses to work when personalDNSfilter is enabled.
A quick test with the default list resulted in ads being blocked for the most part in all tested applications. I ran tests in browsers like Chrome but also opened applications that display ads, and most of the ads were not displayed with the default list that personalDNSfilter uses by default.
Closing Words
personalDNSfilter is an easy to use solution; it does not require root nor expert knowledge. While you need to allow the installation of unknown applications for a brief moment, that is the biggest technical hurdle that you will face when it comes to the application.
The application is open source which is always reassuring as you can inspect the source if you really want to make sure that the app is clean and does only what it is supposed to do.
Now You: Do you block ads on your mobile devices?
Related articles
- Block Androids apps from connecting to the Internet with NetGuard
- Chrome 64 for Android with abusive ad experiences protection
- Details about Google's ad-blocking integration in Chrome
- DNS66 Host-based Blocker for Android
- Hosts File Software Overview
It is worse to check updated version – a lot of new features and improvments! It now also supports encrypted DNS via DOT and DOH as well as dnscrypt integration
I used to run “AdBlock” app on my old phone(android 4.3); it used to crash. Then I stumbled on to this one(personalDNSFilter) on XDA site. Been using this ever since, even on my new phone(Android 8.1).
If i could disable log writing to files. One less i/o for personalDNSFilter ðŸ˜ðŸ˜‹
This is better than any payware VPN. Those who pay a VPN Service are selling personal data to the VPN Provider.
Here you are your own provider and can use public and free blocklists.
Been using DNS filter for a while now, all good but anyone managed to block add in youtube?
Thanks
I just use Adblock Plus on Samsung browser…it works well. But, I do remember using a similar app named Weblock on iOS, which was later removed from the Apps Store due to security reasons according to Apple. Not sure if Apple wanted to care about the security, or its Ad revenue.
It did use a local VPN. However, it really slows down the internet on the device. 😣
Works well on Reddit just getting the occasional add now. No adds at all on Facebook/Twitter using the Metal App.
Open source is a great idea but the problem is how many people have the skills necessary to review the code ?
More than are able to review the source code of closed-source programs, and the people who can are also free to be honest about what they find.
But, in my opinion, this “you can examine the code yourself” aspect of open source is constantly overhyped. That ability is real, and does provide a measure of protection that closed source can’t, but it’s not the primary benefit of OSS, nor the reason that most OSS folks prefer open source.
I feel like this will be constantly connected to somewhere and it will drain my already destroyed battery even faster.
> The app sets up a new VPN connection that all traffic is routed trhough [sic].
It’s the VPN connection that gets me. I have to choose between a regular VPN provider and an ad-blocker that uses the VPN subsystem. Thankfully the VPN provider I use has ad-blocking built-in though I’m not sure how it fares versus a standalone ad-blocking product.
Couple the above with an ad-blocking browser (and aggressive anti-tracking settings, etc) and I’m doing something on a non-rooted OS. tbh, the entire ecosystem is a weaponized data-mining machine. So, I really only have my “finger in the dam”.
This is why I much prefer rooting (a device I can’t root is a device I won’t buy) — I use a real VPN for all communications to/from my device.
Also, a virtual VPN is a workaround solution. Rooting and using the actual Linux firewall is a more solid solution.
If this is similar as Blokada, then you can be sure it doesn’t work right 3/4 of times…at least not on my SM-T819. Only thing that really always works is running Virtualbox with Ubuntu Server and Pi-hole inside on my 24/7 machine. It uses just ~36mb of ram if you run it through VBoxVmService. This + Youtube Vanced and my tablet is completely ad-free.
Adguard user here ! I’ve Adaway but not DNS66 or similar host blockers.
Would be nice to have a comparison chart about all the top blockers !
Can’t see this working on the Youtube App
Started using Netguard because my Reddit feed was blowing up with ads. BUT Facebook mobile still shows ads and suggestions.
How does this perform with Facebook?
I use Adaway and MinMinGuard.
“Do you block ads on your mobile devices?”
Kinda-sorta. I don’t run a purpose-built ad blocker (I don’t care about blocking ads, I care about blocking tracking), but I do root. Then I install a rather large hosts file to block a ton of known-bad domain names, and I run a firewall to block nearly all traffic.
The end effect is that I see very, very few ads on my mobile devices.
Blokada user here, the latest update lets me choose a custom DNS server, and it already had a blacklist and a whitelist as well as a choice of hosts files. Got it from F-Droid and I’m so satisfied with it that I never turn it off. Tried some others as well, but they don’t have the same set of options and ease of use so I’ll just stick with it. I normally check my apps for telemetry and ads, and choose/pay for alternatives, but still there’s a lot to block (sorry, Google).
Netguard works just fine for me for blocking ads.
“Do you block ads on your mobile devices?” – yes, I use open source BlockThis!
Interesting. Ads have generally not been a problem for me on Android as I tend to only use apps that either allow me to pay a small fee to remove ads or I subscribe to (often removing the ads). For web browsing on mobile, I now exclusively use Brave since Firefox is so terrible on Android. Speaking of Brave, Martin, will you be doing a write up regarding the news Brave announced yesterday that they are apparently scrapping development of their own browser interface and instead will adopt a more basic Chromium interface with their own slight tweaks. Seems like a pretty big shift for a company that still has yet to release a 1.0 version of their product on desktop. Be interesting to hear your thoughts on their plans.
Link: https://brave.com/development-plans-for-upcoming-release/
With all these numerous VPN no root “firewalls” popping up, it would be useful if you could do a side by side performance test.
Use AdZHosts list for block all ads !
https://adzhosts.fr/
Link seems dead, but https://filterlists.com/ has more options.
you rooted?
been messing with dns66 a bit on non rooted galaxy s7 edge but nowhere near as good as adaway was on my rooted galaxy s5
What are the pros and cons of using personalDNSfilter vs. DNS66 or Blockada?
I think they all work the same way with the local VPN connection, but what are the differentiators?
I switched to Blockada from AdAway on my OnePlus 2 (Latest Lineage OS with franco kernel). There was a huge battery drain (40-50 percent during night time) when using Blockada, even when not connected to internet. So I switched back to AdAway. My choice of ROM and Kernel might or might not have played their part in the issue, but as an Ad blocker, Blockada was very effective. It has a very nice interface too.
Good question: I can only compare it to DNS66 since I did not use Blockada.
personalDNSfilter is compatible with Android 4.2+ whereas DNS66 with Android 5.0+
DNS66 supports setting custom DNS servers.
The interface of DNS66 looks nicer and is easier to use, e.g. adding new lists is easier.
Functionality-wise, they appear to be identical though.
personalDNSfilter can play with huge host files with more than 1000.000 entries with low memory footprint. Memory usage does not grow with the size of the filter files.
It is pretty small and very ressource friendly.
Now You: Do you block ads on your mobile devices?
I use Adguard. Use it on PC and Android.
https://adguard.com/en/adguard-android/overview.html
I use Adguard as well, but I just use their D.N.S addresses instead of installing any software.
They use easylist as a filter, and it’s very light on resources as it is done on their side not on your computer or tablet.
Maybe they might be privacy issues for some people but i’m OK with that.
There is also one with child safety as well.
AdGuard user as well – PC, Android and iOS.
My own approach is similar but at the same time a little different. I use the NoRoot Firewall app, which also works by creating a local VPN.
Difference is, with this I can block not just any server I want to block (like, using wildcard entries, I blocked systemwide access to any Facebook server). Rather, with this I can also block any installed app from accessing internet at all. Many apps make a connection primarily to report back home and to display ads, while they will still work fine without being able to connect! So all such apps are in my VPN firewall apps blocklist. Evidently apps that need a live connection to function, I allow to connect. But even for those apps the server rules (such as the Facebook block) still apply.
The nice thing is that any newly installed app is blocked from going online until you explicitly allow it to connect. So before allowing your new app to connect for the first time, in the VPN firewall log you can first look up exactly to what servers this app was desperately trying to connect, and then decide what and how to block in that case…
The disadvantage here is of course, I do have make some additions to my own server blocklist on the go, so to speak. For this VPN firewall app does not allow the download of pre-made blocklists such as Easylist. So for browsing from my phone, I use browsers with a wider built-in (or extension) ad filter, and in the browser apps I keep Javascript nearly always turned off.
The end result, I guess, is more or less the same as with the DNS blocklists described above: I’m really surprised in those very rare occasions when I still encounter an ad somewhere on my phone. And then I look in my server log, and block the culprit right away!
Good suggestions here. First thing I install on a clean phone is NoRoot Firewall. More info for others: https://www.ghacks.net/2014/02/10/control-apps-may-access-internet-android-device/
NetGuard is a VPN firewall that allows you to use blocklists.
I’ve been wanting to give that a try for awhile now.
i have been using DNS66 for awhile now on multiple devices , works good. you can get it from Fdroid.
always nice to have alternatives.
I block using AdAway. How do you think personalDNSfilter fares against AdAway? Is this “VPN” free and who pays for the service?
The “VPN” is not really a VPN (there is no external service used). Like root-free firewalls, this works by setting up a VPN interface that goes nowhere outside of your device. It’s a workaround to funnel all the internet traffic through the application itself in the absence of root.
I think (but I’m not 100% certain) that this mechanism doesn’t work if you also use a real VPN.
The use of a virtual VPN on Android is fairly common for stuff like non-root firewalls and the above.
Unfortunately, if you already use a proper VPN you have a problem with such apps. Which might be solved at a stroke if Android included a firewall as standard. Yes, I know that Android is not supposed to need a firewall – but that’s only applicable if you trust Google. Recent Android versions have improved the blocking of permissions – but they still have a long way to go imho.
Perversely, Android does include the standard Linux firewall. The catch is that unless you have root, you can’t configure it. Those firewall apps that require root are really just front ends that configure the built-in firewall.
I really think that Android drops the ball on this — it should include a method of configuring the existing firewall out of the box.
So it’s more like a network filter for ads. Both approaches (hosts file vs filter) have their upsides and disadvantages.