yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] coolvabs:
I cannot get latest adaway 5.1.0 version to block my ads through root mode. I am on oneplus 7 Pro Android 10 open beta 19 and latest magisk version 20.4.

I have enabled systemless hosts module on the magisk and still no ads are blocked. When I see the DNS request log I see the ad server links getting blocked but web pages in browser show ads. Am I doing something wrong?
[Android Apps and Games] wodgey:
It sounds like the ads are hosted on a server that's not on the blacklist.

To test if adaway is working, try viewing your hosts file in a text editor and copy\paste one of the entries into a browser and see if it's blocked.

If that works, try viewing the page on a desktop browser and "inspect element" on an advert to obtain the server address, before adding to your blacklist.

This is how I'd proceed but there may be other methods that are simpler using just your phone
[Android Apps and Games] JudgeDread11:
If you have data saver mode or something similar turned on on your browser ad blocking will not work.
[Android Apps and Games] guest4711:
No need to open tcp nor udp port 53 to the outside. Your dns server will ask other servers for adresses (asking on port 53 on their side). But noone in the internet should ask your servers for adresses. Port 53 must be open on your local net only
[Android Apps and Games] r0tt0r:
thx for that its appreciated though that is not wanted due lets say certain reasons on behalf of the vpn used.

so i guess chaining vpns is technically not possible. i use workprofile now with adaway and vpn in normal profile. thx anybody for their input and keep up the great work
[Android Apps and Games] coolvabs:
I cannot open host files, get a FC, are the host files not being written properly? Cannot see an option to change the host files location in 5.1.0 version.

And no, data saver isn't active. I am seeing ads in apps also.

Edit: I browsed the folder /system/etc and there looks to be a symlink to hosts file which is located at /data folder. I was able to type the hosts file by giving cat command at the terminal and there are many entries in the hosts file (size is above 1 mb) but still ads not getting blocked. I can type the sites in hosts file in browser and the sites open. Is it an issue of read write permissions? However when I enable the VPN option in adaway browser all the ads get blocked. Please help
[Android Apps and Games] andy356:
It is indeed an OOM error. Finally caught the crash!
[Android Apps and Games] coolvabs:
I was finally able to resolve this problem by manually copying the file at /data to the /system/etc folder using root explorer. Now the ads are gone.

Any idea why this was happening? Is it Adaway not being able to write to /system/etc folder - when I see that folder it does not have write permission on a group level unlike the /data folder? I am using BusyBox magisk module also but I don't think that it will interfere with adaway.
[Android Apps and Games] zgfg:
Are you talking about /data/adb/modules/hosts/system/etc/hosts file?

That is the hosts file overlaid by Magisk when you enable Magisk Module Systemless hosts

To make it work properly, you need to:

- enable Systemless hosts in Magisk Manager

- reboot!!!

- then enable root/hosts option in AdAway, let it update hosts file from all hosts sources

- then reboot again!!!

Don't hesitate to reboot:

- some say (that last reboot) is not needed but for some things don't work properly without

- then, what is better, to loose a minute or two of life to reboot or much more because things potentially not working properly
[Android Apps and Games] wodgey:
From my understanding, overwriting the hosts file directly in /etc, it won't survive a reboot as it'll get overwritten.

In your situation, I'd be tempted to write a little init.d script that automatically replaces the hosts file on boot (as with all my ideas, I don't know if this is the accepted "best practice" method, instead just how I'd "workaround" that particular issue)

Edit2add

I decided to poke around in my ROM and I don't have init.d, but I do have the post install.d and services.d folders inside /data/adb which I believe is where boot-up scripts can be run from.

If you do this,, I'd assume that like Linux scripts you'll need the "&" at the end of the

'cp /path/to/adaway/hosts /system/etc/hosts &' so the process can disassociate from the shell and not need to wait for the cp to complete before moving on.

I've not tried this but my thought processes tell me it should work

---------- Post added at 12:26 PM ---------- Previous post was at 11:28 AM ----------

Thanks. This is exactly what I needed and had hoped for. My DNS server will only be short lived, as as soon as I've got the required URLs to whitelist, I'll revert back to root variant

Edit2add

My fail2ban logs are already scary enough, with some sasl attempts on my port 25 and also on my obfuscated SSH server (on a non default port with only pub-key allowed).

On port 22 I have a instance of "endlessh" running that should annoy anyone who's trying a script unattended (whilst making me snicker)

Edit to adjust spelling of snicker, so not too trigger censoring due to incorrectly reading a racial slur
[Android Apps and Games] coolvabs:
What do you mean by "enable root/hosts option in AdAway" in step 3? Can't understand that :( I'm on adaway 5.1.0 and there is no such option in preferences. I've enabled systemless hosts in magisk and can see that modules enabled though
[Android Apps and Games] wodgey:
I assume that they meant systemless hosts

I'm in version 4.3.6

I've just installed 5.1.0 this spare device and I cannot see that option in preferences though
[Android Apps and Games] AlgebraicB:
Systemless hosts is found on settings in the Magisk app, where you can also check if Adaway has root permission, if you can't find Adaway in the Superuser menu on Magisk maybe Adaway isn't even asking for root permission?
[Android Apps and Games] coolvabs:
Yes, there is no option in adaway version 5.1.0. I uninstalled this version and installed version 4.3.6 but when I tried to enable systemless host in preferences I get an error. I have enabled systemless host in magisk and the module is active. Attaching screenshots of both.

I believe I have been getting this problem since I upgraded my oneplus 7 Pro to oxygen OS open beta 19 from open beta 15. Does it have something to do with my system partition being converted to read only? I also downloaded energized magisk module and used terminal to update the host files but it that module also failed to block ads.

This is driving me nuts, hope somebody will be able to resolve my issue :crying:
[Android Apps and Games] coolvabs:
No there is a separate option to enable that in Adaway 4.x versions, see my above explanation
[Android Apps and Games] AlgebraicB:
You're 100% right, my bad, I'm guessing you guys have rebooted after activating systemless hosts in Magisk

Maybe its a problem with the Magisk installation? You should flash the Magisk uninstaller and then flash Magisk again to see if that solves your problem?
[Android Apps and Games] wodgey:
You'll see in my screenshot that there's a toggle for systemless mode in adaway 4.3.6 also.

The person whose query we're responding to has stated that they've enabled systemless hosts in magisk already but unable to get working unless they manually overwrite the symlink in system/etc with the hosts file in the adaway folder
[Android Apps and Games] zgfg:
AdAway 5 can run in two modes, root (aka using hosts file) or non-root (using virtual VPN).

See the first screenshot

Please don't mess AdAway 4 and 5.

In the new 5, there is no more option for Systemless hosts - you must control that from Magisk Manager

See the second screenshot
[Android Apps and Games] coolvabs:
Yes did this and AdAway works like a charm. As suggested I uninstalled magisk and installed it again and now adaway is working fine. As I always do during my oxygenos ob updates, during my last oxygen OS open beta 19 upgrade also I had flashed magisk through twrp and probably that installation of magisk must have had some problem (probably corrupted implementation of systemless host) which was preventing adaway from writing hosts file.

Thanks to you and everyone else who has helped me so much ??? such a relief finally ????
[Android Apps and Games] PerfectSlayer:
I can't get the attachment. Got a 404 error from XDA.

If you still have it, could you upload it on a github issue, gist or even pastbin? Thanks!
[Android Apps and Games] andy356:
https://bin.privacytools.io/?fe6bd2c2c8457140#vpqr8vbhKLbVqfhJz/e6cyqkVMa90kC3+6LtJTjF4m0=
[Android Apps and Games] TheViciousGames:
Best ad blocker on the market,I use it since my first Android phone.Thanks!
[Android Apps and Games] XtraWater:
I'm using the Japanese communication app Line. I can't open links within the app. Then I whitelist rt links like doubleclick.com Google.com...

But still, links are getting blocked. Dns logger doesn't show something. When adaway is disabled it works.

I only have the official adaway host activated.
[Android Apps and Games] DiamondJohn:
Have you turned off AdAway before trying the DNS logger?
[Android Apps and Games] JudgeDread11:
To use the logger you need to have ad blocking disabled.
[Android Apps and Games] Adamk102:
[MENTION=2822685]PerfectSlayer[/MENTION] i have a question. is adding hosts from adguard a good idea?

Wysłane z mojego HD1900 przy użyciu Tapatalka
[Android Apps and Games] wodgey:
I don't see why not. If it's in the same format of

127.0.0.1 domain.to.block

I've cut\paste entries before from different sources into my hosts file. I even use my backup hosts file from my phone, on my windows partition on my laptop
[Android Apps and Games] draiyan:
Hi guys, is it possible to whitelist an app?
[Android Apps and Games] NeverTooYoung:
I'm running a OnePlus 7pro, with oos10.3.6 and rooted with Magisk. Adaway 5.1.0

Everything has worked as it should until recently, when my news app Breitbart, which had been and continued to be ad free, would not let me review the disqus comment section. It just blinks an instruction message at me, real real fast.

I think it is AdAway that is causing it, because if I pause AdAway, it allows me into the comment section, but of course each of the stories is full of ads.

Reading this thread has led me to DNS logs, and testing using this procedure. Can someone please set me straight.

Open Breitbart

Open AdAway, turn it on, choose DNS Logs, clear list, and press start button.

Go to already open Breitbart and press Comments button.

Watch it go crazy, hit back, and look at AdAway again, swiping down on the screen to populate the log.

I'm led to believe that I'm then supposed to allow or whitelist whatever and all that is showing. Is that correct? Do I then need to reboot for changes to take affect, or is that for past versions?

Or, perhaps one of you already knows what I need to block or allow.

Many thanks in advance.
[Android Apps and Games] githyanki:
Disable ad blocking first, enable logging, open your app and try to comment. Switch back to adaway and look at the log. Whitelist some of the hosts or all. Re-enable adblock (reboot shouldn't be needed). Kill your app and restart it and see if it works. Repeat until it does, then you may want to remove some of the hosts that you whitelisted that didn't fix the issue.
[Android Apps and Games] DiamondJohn:
Not using AdAway. The closest you can do is run a log to find all the hosts it connects too and then whitelist those. But any and ALL apps would then be able to connect to those hosts.
[Android Apps and Games] JudgeDread11:
I am using root mode, so not 100% sure here, but I thought that the VPN more (non-root) allowed you to whitelist apps.
[Android Apps and Games] iamlaybhari:
Is there any way to whitelist any site?
[Android Apps and Games] zgfg:
AdAway 5.1.0 (recently officially released, no more beta - now also in the subject of this thread) provides two modes: root/hosts and non-root/VPN.

In the VPN mode, you can whielist apps

Btw, all that was already commented in this thread

---------- Post added at 07:07 AM ---------- Previous post was at 07:03 AM ----------

Of course, it has been always supported
[Android Apps and Games] DiamondJohn:
Yep, sorry, my bad, I have never used the VPN mode of AdAway.:o
[Android Apps and Games] Francescoso:
Hi I have a problem that Amazon application is not working. turning off adaway works instead. do you know how to solve?
[Android Apps and Games] zgfg:
Did you search in this thread (icon top-right) for the keyword Amazon, which sites must be whitelisted
[Android Apps and Games] Francescoso:
I don't found the solution ☹️
[Android Apps and Games] daywalk3r666:
https://xdaforums.com/search/thread/2190753?query=amazon

3rd result
[Android Apps and Games] dingsaller:
Deactivating adaways webserver also helps!
[Android Apps and Games] zgfg:
Sorry, but I don't understand how you couldn't find (if you really invested just 5-10 minutes in)☹️

When you put the keyword Amazon to the search, you get results like on the screenshot 1

You need to shortly read what is displayed for the found posts, and open those that look promising

After skipping the first few (your question about and so), ninenth in the list looks promising to be opened and more carefully read.

Indeed, it provides the 'solution' worth to be tried - sceeenshot 2
[Android Apps and Games] NeverTooYoung:
I've given this a couple of days of following your appreciated directions, but can't seem to find the right fix. Maybe in a few days I'll give it another go, but if anyone has some more input, I'm all ears!
[Android Apps and Games] andrea0807:
Why is adaway unable to block ads on this app.?

https://play.google.com/store/apps/details?id=com.azip.unrar.unzip.extractfile&hl=it

I am using version 5.1.0 on poco f2 pro with xiaomi.eu weekley rom (android 11)
[Android Apps and Games] 64ashg:
Can you upload a screenshot of the ad?
[Android Apps and Games] andrea0807:
Spoiler content hidden.

Inviato dal mio lmi utilizzando Tapatalk
[Android Apps and Games] 64ashg:
I isntalled and extracted a file, all i got was the in built ad.

I am using redmi k20pro / mi9tpro running aicp 15.0 (los17.1 based) with

dns.adguard.com in private dns settings , ipv4 redirection as 0.0.0.0, disabled web server and bluGo energized hosts

https://block.energized.pro/bluGo/formats/hosts.txt

Try the above settings and only this host.

Ps try this app as the app you use, its dev has a host of cleaner apps, shady privacy policy and all that probably for data mining. Just a suggestion.

https://play.google.com/store/apps/details?id=com.rarlab.rar
[Android Apps and Games] andruyd:
Does Adaway have a config file where I can just copy and paste multiple lines of block/filter lists?
[Android Apps and Games] zgfg:
Preferences, Backup/Restore, saved as adaway-backup.json

Instead of an URL for a hosts source, you can also point to your local e.g. blacklist.txt file (must be in the format as hosts source file) where you define your own list of domains to be blocked
[Android Apps and Games] ManWithTheSmile:
Hello,

I found scanned AdAway apk on Virus total 2 engines detected "A.gray.andrsca.f"

Is that normal...?!

https://www.virustotal.com/gui/file/1239c845cd40a27120cdeb9941961b38e2fe4925d4c4150b8547a1d05bed239b/detection
[Android Apps and Games] zgfg:
If you instaled AdAway from its GitHub, it's not a virus
[Android Apps and Games] ManWithTheSmile:
I have downloaded it from Github, Xda and F-droid too...
[Android Apps and Games] jcmm11:
You get over 60 "undetected", one trojan, and one A.gray.andrsca.f

It's a false positive.
[Android Apps and Games] Portgas D. Ace:
The issue here seems to be that the ad is hardcoded into the app (and not loaded from an external network source), so AdAway can't block it.
[Android Apps and Games] ManWithTheSmile:
Cool, thanks :) !
[Android Apps and Games] m0han:
5.1.0 on android 11

device: x00td

rom: nitrogen os a11

magisk: beta v21.1

magisk manager: v8.0.3

4.3.6 working ok. 5.1.0 does not get installed. any way to get it working?
[Android Apps and Games] celestialspring:
I thought the problem was with non rooted phones only.
[Android Apps and Games] guest4711:
Perhaps your old version is signwd using a different key (f-droid uses its own when building). So you may either update using the same souce (e.g. Git or f-droid) or deinstall rhe old version and instell the new one. (export your lists before de-installing!)
[Android Apps and Games] celestialspring:
I was attempting a fresh install on a new phone.
[Android Apps and Games] zgfg:
Anybody alive here after XDA "enhanced" the Forum?
[Android Apps and Games] Portgas D. Ace:
Sure, why not?
[Android Apps and Games] celestialspring:
This new layout is pretty useless.

The forum will suffer.
[Android Apps and Games] Marctiell89:
sorry for my bad english ... with the latest version of adaway for root, amazon app and prime video app not working for connection error. can you help me?
[Android Apps and Games] Portgas D. Ace:
Please search this thread for the keyword "Amazon". It has been answered multiple times before.
[Android Apps and Games] Marctiell89:
Unfortunately, the search doesn't work, I had already tried! can you help me?
[Android Apps and Games] Marctiell89:
Can't be more precise? I don't want to install an old version of adaway
[Android Apps and Games] zgfg:
Talking about the latest AdAway v5.1.0

Before asking, did you carefully look into the Preferences for Root based adblocker
[Android Apps and Games] Portgas D. Ace:
It seems that the search engine hasn't been setup correctly until now after the migration to the new forum structure..

The Amazon issue pops up nearly every week. So you could just read the last few pages of this thread, you'll find the answer there.
[Android Apps and Games] Marctiell89:
This solution seems to work but ... what should I do?
[Android Apps and Games] celestialspring:
Try doing a Google search with domain specific search. May be you can get a cached result.
[Android Apps and Games] zgfg:
That was the same solution I noted you earlier. Go to Preferences and disable the Web server option (Preferences, Root based adblocker,, uncheck Enable Web server). I think, somebody also wrote to make sure (another setting) that IPv4 redirection goes to 0.0.0.0, not to 127.0.0.1.

To test, you must always restart the phone

You can also open Blocked list, search for amazon. string. Find which of them are blocked. E.g., something like ...amazon.fr (Amazon France). Put those domains to White list, restart and test.

There was a post like a month ago (unfortunately, we paid the price for XDA upgrade, one of the most useful feature, searching inside the threads does no more work), you must scroll pages backwards and read

Alternatively, use DNS logging (read AdAway Wiki from Github to learn how-to) to find which amazon domains are blocked but your Amazon wants to access - put them to Whitelist, restart and test again

I don't use Amazon hence I cannot help you any closer. Generally, read the AdAway Wiki and play with the app, to find where is a particular option and how to use them. Essential hints (disabling internal Web server, DNS logging, whitelisting) are all above

Good luck
[Android Apps and Games] Oswald Boelcke:
For years now, I always redirect to to 0.0.0.0 and not to 127.0.0.1, also for the reason that 127.0.0.1 actually causes network traffic, what 0.0.0.0 doesn't do.
[Android Apps and Games] zgfg:
127.0.0.1 must be linked by ARP to your own MAC address, hence it could not cause any real network traffic

But yes, the app or browser sends to localhost (127.0.0.1, to itself) - but your TCP does not listen on the particular port (certainly, if Web server is disabled), whereas for 0.0.0.0 it cannot even send to itself since it's an invalid IP address and ARP cannot resolve where to send
[Android Apps and Games] Marctiell89:
I solved by following this step:

"That was the same solution I noted you earlier. Go to Preferences and disable the Web server option (Preferences, Rot based adblocker,, uncheck Enable Web server). I think, somebody also wrote to make sure (another setting) that IPv4 redirection goes to 0.0.0.0, not to 127.0.0.1.

To test, you must always restart the phone"

thank you so much guys, you are always the best
[Android Apps and Games] cultofluna:
How to whitelist xda...?..

LoL...

Updated xda app it's not working with adaway on..
[Android Apps and Games] manojl76:
Mine new xda app works without problem with adaway
[Android Apps and Games] knpk13:
Not for me with default hosts files. https://xdaforums.com/t/check-out-t...ink-app-rolling-out-now.4199599/post-84066451

Also can't figure out how to disable adblock for specific apps (like XDA). Checking the DNS logging section for domains to whitelist, but it's always empty.
[Android Apps and Games] zgfg:
Please distinguish whitelisting apps vs. whitelisting domains:

You can whitelist an app only in non-root/VPN mode (you cannot in root/hosts mode).

In that case particular app is exempted from ad-blocking completely (for all domains).

Therefore, DNS logging has nothing with whitelisting an app like XDA - if you are in VPN mode and you define whitelisting for the user app XDA, ad-blocking will not apply to that app at all

Both in root/hosts and non-root/VPN mode you can whitelist particular domains - open Whitelist tab, add domains, Apply and reboot.

In that case those domain(s) will be exempted but for all apps. You need to use DNS logging to find domain(s) that are blocked by your hosts files but wrongly, because you have apps that need access to that domain(s) - however, once whitelisted, those domains will be whitelisted for all your apps on the phone

Btw, I have default hosts files (plus nine others) on two phones (one in root and another non-root mode), and I can login and use the new XDA app (I'm not happy with the new app, the old one was more useful for me but that is another story) on both phones, with no need for whitelisting anything (apps or domains)
[Android Apps and Games] knpk13:
To clarify, I'm using root mode, I'm referring to whitelisting domains so certain apps work like you said. The problem is DNS logging is always empty no matter what I do, so I don't know what to whitelist. And not sure why but XDA doesn't work for me without disabling adaway. I've attached screenshots. The error message said something about SSL, so I tried installing the adaway certificate, but I still get the same error.

Another weird thing is that even though I use the default hosts file souces in all my phones, some of them have different numbers of blocked hosts.

And same here, the new XDA mobile site is nice (way faster) I guess, but the app just seems like a wrapper for the mobile site and I hate apps like that. I'm getting notifications for every post in a thread and there's no thread search. This sucks.

And if the app is just a wrapper for the website, then I find it odd that the website works in the browser without disabling adaway, but the app doesn't.
[Android Apps and Games] cultofluna:
Whitelist "com.xda.labs.play" save and reboot
[Android Apps and Games] knpk13:
That's the app's package name, not the domain I need to whitelist right? Still tried it, but didn't work as expected.

I also searched the blocked hosts lists for XDA and found 3 hits. Like "xda-developers.us" and "ads.xda-developers.com". I whitelisted them but the app still didn't work.
[Android Apps and Games] cultofluna:
Works great for me...

Whitelisting this package ..

Had exactly the same issue as you have..

Reboot after whitelisting..

Btw using 4.3.6 adaway..

EDIT Working great also on latest adaway
[Android Apps and Games] Oswald Boelcke:
No problem here with the new XDA app. No chances to my AdAway settings or hosts at all. AdAway v5.1.0 as root.

EDIT: Webserver is enabled. Initially it worked with enabled webserver but while using the app I ran into problems, and I'd to disable the webserver.