Use Mullvad's dns servers https://mullvad.net/en/help/dns-over-https-and-dns-over-tls#android. Their vpn also has dns blocking capabilities.
post
On fdroid Dnsnet and Blockads are nice, i also used and help translate Athena.
Used adaway, too but long before 2021. Good alternative is to host a small vps server, install adguard home, use hosts confs as common and then use DoT on a unrooted phone to this vps. GrapheneOS for example.
Or easier, just use a DoT provider with adblock which you trust. Quad9, adguard-dns and so on.
There's a magisk module for this.
You mean systemless hosts works without being called/used by an app? Do you know the systemless hosts file path?
I think it had a configurable path? Or at least it told you. But sure, automatic updates is another matter. I don't think it can do that.
Can't you just point AdAway to Stevenblack's hosts or something?

This is all I do. It works pretty well. I sometimes have to turn it off briefly to log in to airplane wifi or such.
Thanks! For this, I am using Mullvad's ad blocking DNS. 😊 I want to be able to block specific hosts and IP addresses on a hosts file level in order to block certain system apps from connecting.
FWIW, if you self-host Adguard, you can do those things without needing to bother with touching individual hosts files. It'll also then just work for every device on your network. Create your own domain and expose adguard via a subdomain and you can just point your phone at your DNS server while you are on external networks too.
You also can put the hosts file made for a Linux system into the mounted /system/etc/hosts, the system partition /system can be mounted on /mnt or /mnt/system too.
As you have root, or with just a custom recovery, you can change it, just going to the recovery, using adb in there and mounting the system partition as rw, then moving the hosts file to the mounted expected location.
Interesting! And thank you! I already see a hosts file under /system/etc/, for now only containing localhost. Could I not just edit this file and be done? I know too little about how Android works...
If I do need to mount /system, can I not do it from the stock recovery? I think I saw a "mount system partition" in there the other day.
I know too little about how Android works...
Yeah, this is a more advanced thing, I think the other methods described on the post are better, if you don't have a custom recovery AND custom rom. If the device is locked or have the stock rom, it might not boot, because of the signature checking on the image.
I use controld.com DNS over TLS. They have a free ad blocking and malware blocking DNS that works incredibly well.
I use ublock origin for my browser and use Mullvad DNS with content blockers. I don't know what VPN you use but as long as you can set your own DNS then Mullvad servers should work.
If your router allows you to set the DNS server you can block ads network wide.
Does anyone know if this DNS adblocker is safe to use? I tested it briefly and it seems to work as well as rooted AdAway
all 21 comments