Tutorial How to block ads in all Android apps and games (No root & root)

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,377
275,984
1,213
Modding World
Tired of random ads and popups that ruin your experience and interrupt while playing games, waitching video and surfing on the web? and while using mods with malcious ads from other site? This simple trick block across your entire device, in your browser, in the apps and the games. Some of these tools require root access, but you won’t need it at all in most cases.

Blocking ads is highly recommended if you use mods from other site with malcious ads injected! DNS method and Adblocker apps should be able to bypass anti-adblock and crashes automatically. If you use AdAway with root permission, make sure to enable webserver in AdAway settings to improve bypassing anti-adblock

Changing the DNS (Android 9 Pie and above)
One of the easiest ways to block ads on Android smartphones is by changing to an ad-blocking service’s private DNS provider. This method requires no apps, but it only works on Android phones with Android 9 Pie and above, as the Private DNS setting was introduced with this version of the OS.

To change the DNS, go to Settings > Network and Internet > Advanced > Private DNS. Choose the option “Private DNS Provider Hostname”, and enter the DNS of your choice

Default server
Code:
dns.adguard-dns.com
AdGuard DNS will block ads and trackers.

Family protection server
Code:
family.adguard-dns.com
AdGuard DNS will block ads, trackers, adult content, and enable Safe Search and Safe Mode, where possible.

On some phones, the path to change the Private DNS may be different. If your phone UX has a search bar, simply search for “Private DNS” to land on the relevant settings page.

However chrome is designed to ignore this by default. So an additional step is required for blocking ads in chrome.

Type "chrome://flags" in your chrome browser. Search for "Async DNS resolver" in the page which opens up and change the value to "Disabled". This will ensure chrome follows the system DNS setting.

That's all! Enjoy an ad free phone

Using apps
Those apps sets up a local VPN to filter out ads and trackers that doesn't require root, and may drain battery a bit, while root way like AdAway and LP can directly modify hosts in the system without VPN, thus saving battery life

Choose the apps you like to use. They are pretty easy to use, just need to install and press a button to enable. Make sure to allow installing apps from unknown sources in your device’s OS settings. I recommended Adaway in root way because it's free and lightweight

Adaway (Recommended) (No root/root):


Blockada (No root):

DNS66 (No root):

Adguard (No root):

Adlock (TRIAL) (No root):

Clario (TRIAL) (No root):

Lucky Patcher (No root/Root):
Best if you have root access. No root way requires you to create modded APK. It is not recommended to do
Tutorial: How to block ads using Lucky Patcher - Platinmods.com - Android & iOS MODs, Mobile Games & Apps



Replace hosts file manually (Root only)
Download any hosts file you like to use: StevenBlack/hosts

Open any file manager, enable and grant root access and replace "hosts" at /system/etc

Restart your phone and you are now ad-free!

With this way, you can't whitelist the sites or apps. If you use Chrome or other browsers which have "data saver" or "VPN" build-in, enable it to bypass adblocking and bypass anti-adblock warning message. Or use Puffin Browser or any free VPN apps.

Got a problem?:
* If you use Chrome or other browsers and still see ads on web pages, remember to disable the "data saver" or "reduced data usage" browser option
* Check your APN settings for any proxy, the proxy itself could be allowing ads. Disable the proxy.
* After you install or make any change to AdAway, you must reboot for those changes to take effect
* Disable VPN connection if connected

My hosts
If you want better adblocking, stability with less false positives you can add my hosts source in the adblocking app and disable all others or replace hosts manually

It is written from scratch by myself and been using it daily since 2016.
https://repo.andnixsh.com/adblocker/hosts
 
Last edited:

GG78

ADBlock Expert
Jan 6, 2019
921
54,035
1,193
HexHausen
1. Very nice

Now my experience:

DnS66 was great in the older days (til Android 6) in 2019 its dead cause of new OS versions.

Adguard Premium, i was a huge fanboy but unfortunately it stops a lot on Android Pie (it just turns off, even if i set it to high priority, ignore battery optimization, always run, still same shiet) under Android 7 & 8 (like on my Huawei Mediapad) it works flawless and never stops.


So yeah for my Android 9 device i modded all the apps i use myself (most i shared here too) and for internet i use Kiwi Browser with uBlock Origin extension = also 100% Adfree without using any App ?
 

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,377
275,984
1,213
Modding World
@0x404 Didn't know that dns66 was dead but it was updated months ago

yeah uBlock Origin is great, i'm using it on Firefox browser. But for blocking all apps and games, I use Adaway with only my own filter enabled since I have root on my phone running Android Pie :)
 

Not-Dead

Platinian
Dec 9, 2020
23
19
8
Earth
Well Don't Do that Please This will make people stop making games Ads is only way to earn for a starter Buddy please don't do that :face49: :face01:
 

UAQKunoichi

Just Crazy
Jul 25, 2017
304
665
93
27
Land of the rising red dot
I don't care about pay2win games.
I do what I want and my main target is to block malcious and annoyance ads
They also die even they don't use ads
Lol.I myself use LP nor only can I remove ads on specific app,do Android Care patch, but also patch inn-app purchase and Google Play patch so I could update mod app from Play Store even if signature doesn't match.
 
  • Wow
Reactions: Daisasuke Kurogane

AndnixSH

PMT Elite Modder
Original poster
Staff member
Modding-Team
Jun 27, 2017
4,377
275,984
1,213
Modding World
Lol.I myself use LP nor only can I remove ads on specific app,do Android Care patch, but also patch inn-app purchase and Google Play patch so I could update mod app from Play Store even if signature doesn't match.
that's nice haha. I will make tutorial for this later
did you also tried this on mod with malcious ads? XD