yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] zgfg:
It's by design, ie, due to the different technologies used for blocking

AdGuard is much more sofisticated, it acts like a firewall, filtering out a bad traffic from the good traffic on the sockets level

On the other side, Blokada or AdAway work similarly like a private DNS that does not allow to resolve a DNS host name to the IP address, for the host names (sites) on the blocked list

That way AdGuard can block ads ('bad' traffic) coming from the given IP address, while at the same time allowing the 'good' content coming from the same IP address

On the other side, AdAway and Blokada can only block you to resolve the known 'bad' sites (DNS host names) to the corresponding IP addresses

Hence if you put a certain host name to the blocked list (Blokada, AdAway), then the app (or browser) will not be able to resolve that hosts name to the IP address and no connection will be established at all - hence no ads ('bad' traffic) but also no wanted/'good' content from that site.

On the other side, if you don't put that host name (site) to the blocked list, then the app/browser will be able to resolve the host name to IIP address and then both the good and bad traffic from that IP address will be allowed

As you see, that's the main difference - Blokada and AdAway divide the sites to blocked and allowed (old names: 'black' and 'white', now forbidden as not politically correct, but I need them now to better visually describe the differencies in technologies), while AdGuard allows also the 'grey' sites where some traffic from those sites is allowed and some not

Also, Blokada and AdAway cannot prevent to establish a connection (and therefore cannot block any traffic from that site), if an app goes to some hard-coded IP address (they only block on the DNS level - not allowing to resolve the 'bad' host names to their IP addresses)

Such IP address does not need to be hard-coded in the app. The app establishes the connection to its server (you don't block that), but then the server (while providing a 'good' content) provides also the IP address where the app will then go to pick-up the ads.

Again, Blokada or AdAway cannot block that because the DNS resolving step is omitted
[Android Apps and Games] amine4ever:
I think that google manged to bypass adaway.
[Android Apps and Games] prplx:
so is there anything you can do about it? or you just have to deal with it 😕

also what about the ad placeholders, like many times the ad gets blocked but then there's a placeholder left, is there nothing you can do about that either?
[Android Apps and Games] zgfg:
I use AdAway and don't have problems with the latest (always updating to the latest) Chrome
[Android Apps and Games] zgfg:
Switch to AdGuard, deal with the DNS based AdAway or develop your own adblocker😁

About placeholders, try with disabled Web server (Preferences, Root based ad blocker)
[Android Apps and Games] amine4ever:
Test Ad Block - Toolz

Looking for an easy way to check the efficiency of your ad blocker?Toolz offers a simple and beautiful design test that allows you to quickly and easily test the performance of current ad/content blocker solution. Intuitive interface makes it easy to navigate and use, and the beautiful design...

d3ward.github.io

What's your chrome score vs your brave browser score?
[Android Apps and Games] zgfg:
Not using other browsers

Interesting test though but scores should also depend on the source hosts file used in AdAway

PS: Tested Chrome again with AdAway turned off and Ads, Analytics, etc, all were red - hence AdAway works pretty good for me
[Android Apps and Games] m0han:
i don't use brave browser. my chrome score below.
[Android Apps and Games] stankyou:
What source hosts files are guys using? Chrome on my Pixel 6 has been displaying ads. Not one of them blocked. Data saver/lite mode is disabled but it seems it's still routing my connection through Google making the ads slip through.
[Android Apps and Games] m0han:
mine can be seen from the 2nd screenshot in the post above yours.
[Android Apps and Games] zgfg:
Screenshot
[Android Apps and Games] zgfg:
Btw, I added from your list:

4PDA

https://schakal.ru/hosts/hosts.txt

and now I also have 100% with Chrome

(Not using 1 host (Pro), first from your list)
[Android Apps and Games] m0han:
cool; that makes it a dozen (or 14, maybe) for you. does the 'many hosts' make your device/system 'lag'?
[Android Apps and Games] zgfg:
Not. It's root mode, I have disabled automatic periodic updates - once a day or two I open AdAway and let it update the hosts.

For the proper update (systemless hosts file requires reboot that Magisk mounts to the /system/etc/hosts), I have to reboot the phone to take effect - hence periodical automatic updates make no sense

I have only 210k blocked sites, or 10.3 MB hence there is no stress on the system
[Android Apps and Games] amine4ever:
I had 40% in chrome. I copied the hosts from your screenshots. Applied them and rebooted. Now i got 12% in chrome 😂
[Android Apps and Games] m0han:
root mode here too. 357k blocked sites, 19.13 MB hosts file.
[Android Apps and Games] m0han:
whose screenshots? @zgfg's or mine? :D
[Android Apps and Games] amine4ever:
Both haha
[Android Apps and Games] zgfg:
Yeah, ok. Good point

AdAway shows 14 hosts sources on the main screen, but I omitted from the screenshot 2 local hosts sources (local files on my phone)

In the myAllowedList.txt I have eight hosts to Allow (mostly bcs GoodbyeAds Xiaomi hosts source is too restrictive and blocking something that I need my Xiaomi/MIUI apps could do)

myBlockedList.txt is empty but ready in case I need to manually extend the blocked list

When you have more than one or two sites to add to the Allowed or Blocked list, then it's more convenient to use a local source file with the list (or to put that hosts source file to your GitHub) than adding them one by one by + icon from the main AdAway screen
[Android Apps and Games] Wolfcity:
Testing https://schakal.ru/hosts/hosts.txt too.

Browser is Firefox Beta with Privacy Badger and uBlock Origin.

Non-Root mode.
[Android Apps and Games] m0han:
schakal seems to be doing a good job. this time Firefox with uBlock Origin. root mode.
[Android Apps and Games] zgfg:
Actually, disable all other hosts sources, leave only Schakal and it will pass with 100%

I doubt that test uses hosts (samples) from Schakal list
[Android Apps and Games] Wolfcity:
Quite possible. I will have to wait if Schakal isn't blocking some needed things.
[Android Apps and Games] amine4ever:
I think i found the culprit for chrome.

DNS-based Ad Blockers are broken on latest Chrome versions, so here's a fix

Google Chrome recently was updated to support asynchronous DNS, which has a side effect of breaking DNS-based ad blockers. See here for a fix.

www.xda-developers.com

The problem is that i can't manage to find that flag in the latest chrome.
[Android Apps and Games] Nergal di Cuthah:
That's from 2018 i doubt it's the cause, i think the flag is the privacy setting "use secure dns" and i have that off and doubleclick still passes through hosts file on chrome
[Android Apps and Games] prplx:
would love to but as I said it's not working on oneplus as the "battery optimization" turns it off 🤬

and I don't have root either 😕
[Android Apps and Games] gallegonovato:
Good afternoon:

But the test creator d3Host also has a hosts: https://raw.githubusercontent.com/d3ward/toolz/master/src/d3host.txt and for ublock https://raw.githubusercontent.com/d3ward/toolz/master/src/d3host.adblock . It is in his github https://github.com/d3ward/toolz#ad-block-test--link . And so you block those things. You can also find more tests at: https://github.com/d3ward/toolz

@zgfg https://schakal.ru/hosts/hosts.txt puts you in allowed things?.

By the way or how can I do to make some changes in the Adaway translation. I am testing in Adaway. But I get almost 100% but it doesn't allow me to edit or anything. It won't go any further...

Best regards
[Android Apps and Games] zgfg:
Nope, standard blocked list
[Android Apps and Games] Nergal di Cuthah:
Only added about 600 to my blocked count, but that's 600 i didn't have

Got a 100 on firefox and 77 on chrome, no noticeable improvement
[Android Apps and Games] HiTechHiTouch:
I did spend time skimming and selectively searching this thread with no joy trying to find a consise explanation of the colors and meanings for the presence/absence of check marks in the user lists.

When I look at the allowed list, items have either an empty white box or a red box with red check. Since it is the "allowed list" I'd expect unchecked white box items to be tests that when successful (match) allows the address to be passed through the proxy.

When I see a box with a red check, I get confused, and think that red check also means allowed. This is enforced because at the bottom of the list with the three list types (blocked - allowed - redirected) I see a red check + allowed. This implies that red check on a list item would make it allowed. But that conflicts with the idea that the list is of allowed and disallowed items, where all items checked or unchecked items are allowed. ???

Further research reveals that the red in the three list types (blocked - allowed - redirected) identifies the list being displayed, and is not a block or allow legend!

May I politely suggest...

1. Change the color to the three list symbols at the bottom page footer to all white. Then divide the footer into three parts, and reverse video the active third (where previously you set the symbol color to red).

2. On the Blocked list, change the (constant) symbol White Checked Box to Red Circle-Slash ('general not' or 'forbidden').

3. In the Allowed List, change the red check box to an red circle-slash (forbiden) and change the white box to be a green plus. (Remember some people have red-green color blindness, so it's not enough just the change the color).

4. On the Redirected list, change the (constant) symbol White Checked Box to white redirection arrows.

5 . Consider floating a legend line to the top or bottom of the DNS requests list "tap symbol to add url to Blocked/Allowed/Redirected lists".

Likewise, float a legend line on the Blocked, Allowed, and Redirected lists.
[Android Apps and Games] HiTechHiTouch:
Further on boxes, check, and colors.

It first appeared that the buttons on the Blocked and Redirected lists were always the same. While experimenting, I've been able to produce Blocked list buttons of empty white box and red checked box. I can toggle them.

This leads to the quesion of what do the changable colors on the blocked list buttons mean?

Similar on the redirected list.

Finally, when I use the search feature, there doesn't seem to be a way to turn it off, i.e. restore all entries to the display. But save that problem for later.

If I can get a good explanation of things, I will write a help page.

Next topic is how the allow, block, and redirect lists interact. For example, which order are they searched? When a wild card is on one list, will it catch an exact match to an entry on another? How do the "pre loaded" (source) lists take precedence, and how can entries be overridden since they don't seem to be deletable from the user lists.
[Android Apps and Games] zgfg:
Answering to one of your questions:

Allowed is stronger than blocked

First off all, if you don't have any hosts source, than all sites are allowed.

Hence you actually don't need to put anything to the Allowed list

But as the name says, this is an ad blocker. Hence the purpose is to use the hosts sources that will BLOCK certain sites

But once you start using someone's hosts source (by default, I'm talking about the blocking lists), you have no influence on which sites will be blocked by the hosts source or not

If it blocks to less, you will another hosts source to your list, and later maybe more and more hosts sources there

However, at some moment you may find that you can no more shop at eg Amazon, because one (or more) of your hosts sources blocks the Amazon. You could spend time to find which hosts source blocks the Amazon and remove it from your hosts sources list. But the Amazon may soon appear in another hosts source...

Or, you may otherwise like that hosts source that blocks the Amazon because it blocks a zillion of other sites you really want them to be blocked

Hence you better put Amazon to your own Allowed list. Then you don't need to worry about in which of your hosts sources Amazon is blocked (or might become blocked in the future, upon the hosts sources updates)

AdAway first reads and compiles the list of Allowed sites. Then it goes to the blocked lists. Whenever it finds the Amazon site (that you did put to the Allowed list) in any of the blocked lists, it will ignore it, knowing that you specifically asked to allow that Amazon site

That's the use case behind the Allowed list. And the reason why it is, and why it must be stronger than Blocked list.

And the same policy (allowed is stronger than blocked) applies also to other ad blockers
[Android Apps and Games] mrrocketdog:
dang good writeup @zgfg.:good:
[Android Apps and Games] ipdev:
When you first open the blocked list you will see the current list that is being blocked.

In the upper right, there is a search icon and switch window icon.

The switch window icon will switch between the current list and you personal blocking list.

The hosts sources, blocked, allow and redirect lists are setup the same way.

Only the entries that you select will be used.

The selected entries will be the ones that have the check mark.​

When AdAway builds your current blocking list it:

Combines all the entries from the blocking hosts sources and your personal blocking list.

Removes duplicate entries.

Removes all the entries that are in your allowed hosts sources and your personal allow list.

Set the new current list to use for blocking.

---

You can use an asterisk * in the Allow lists.

You can not in the Blocking lists.

---

See attached screenshots for example.

Spoiler content hidden.

Hope it helps more than confuse. 🙃

Cheers. :cowboy:
[Android Apps and Games] m0han:
👏 (y)
[Android Apps and Games] m0han:
helped :cool:(y)
[Android Apps and Games] m0han:
i couldn't figure out how this is done.
[Android Apps and Games] zgfg:
You have to create your simple txt file like (allowed list):

#Example allowed hosts souurce file

magisk-modules-repo.github.io
topjohnwu.github.io

bit.ly
s.youtube.com

Then go to AdAway, Host Sources, + (to add a new host source), select Allowed (instead of default Block) and select File (instead of default URL).

It must open your default Files (file manager), navigate to your txt file on the Internal memory.

(I tried once with third party file manager but the content type link was not valid after reboot)

Then as usual, accept Apply Changes and you should see the imported allowed sites in the Allowed box
[Android Apps and Games] m0han:
did all that. but, things don't seem right (unknown update status). see screenshot.
[Android Apps and Games] zgfg:
Seems it cannot open as a text file there.

Mine local path looks a bit different: content://com.android.externalstorage.documents/...

(not media)

If you have GitHub account, you can upload the txt file there and use URL like:

https://raw.githubusercontent.com/m0han/...
[Android Apps and Games] m0han:
tried; couldn't upload. where is 'there'? could you provide direct (upload) url? it's plain to see i'm new to github.
[Android Apps and Games] zgfg:
Sorry, it's not straightforward, better google for a guide to start using GitHub

You must first create your (first) repository, like my Etc on the screenshot, then upload there....

You'll need some time to learn, but it will be useful later 👍
[Android Apps and Games] m0han:
do things look ok now? wonder why it is showing five 'up-to-date sources' when there are six(?).
[Android Apps and Games] zgfg:
On my old phone it similarly shows 11 on the main screen but I have them 14 active in the Hosts sources list - but it works fine

Your Hosts sources list screenshot looks ok, you have local Allowed file with 5 sites and Allowed file on GitHub with 26 (additional).

Main screen shows 31total in the Allowed box

Open Allowed box and check if it lists the correct sites

Try to open an allowed site, does it open eg in browser.

For a useful test the site should be blocked the hosts sources (to make sure that Allowed overrules).

(Always restart the phone upon changing AdAway config)
[Android Apps and Games] DiamondJohn:
shouldn't content have 3 forward slashes

ie content:///location1/location2/location3

the format is content:// while the location starts with a slash eg /location1/location so when they are together we start with 3.
[Android Apps and Games] zgfg:
The third slash is for the absolute path (location)

But here it starts with the content provider, like on the screenshot

See also:

Content Providers in Android with Example - GeeksforGeeks

A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.

www.geeksforgeeks.org

You can test yourself in AdAway
[Android Apps and Games] DiamondJohn:
My bad. Ive never used content providers in adaway personally, but was thinking it would be like the file format. Is there a practical benefit (ie apart from "the Android way") over using a simple file format link?
[Android Apps and Games] zgfg:
As described in an earlier post today. Try to add yourself - click + icon to Add a new host file, select File instead of URL type, it will automatically open your file explorer, navigate to the file, select - it will create the content type link with the authority/provider as mentioned

I didn't manually type in that monster content link as on the previous screenshot 😁
[Android Apps and Games] DiamondJohn:
I think I may know the answer to my own question; untested. The contents provider may be the only option for non-tooted devices, due to android security. i have always been rooted so never comprehend all the limitations of not being rooted.
[Android Apps and Games] saar17:
Adaway doesn't work for some reason.

Im on a OP 8T running android 12 c.16.

See attached image, anyone can tell me what is the issue and how to solve it?
[Android Apps and Games] Nergal di Cuthah:
Well going from the error, the first question is do you have systemless hosts module installed in magisk?
[Android Apps and Games] saar17:
Yes and it is in magisk hide modeView attachment 5603723
[Android Apps and Games] zgfg:
What is "in Magisk hide mode"?

MagiskHide (DenyList in new Magisk) is irrelevant for AdAway - actually you must not put AdAway to MagiskHide or DenyList

You don't hide Magisk from AdAway (like from banking apps), to the contrary!

Make sure AdAway is not in MagiskHide (DenyList) list and reboot.

Reinstall AdAway then, and make sure you grant the root to AdAway when asked
[Android Apps and Games] saar17:
It is not, just wanted to provide more info
[Android Apps and Games] ipdev:
You can try wiping data and cache of AdAway and try again.

For me..

That error message only shows up when my Magisk install is borked or becomes currupt.

[ Can also happen if your system (ROM) is borked or currupt. ]

For some reason, AdAway is the first app that gave me errors.

So you might want to look at your Magisk installation/setup.

Try deleting your magisk.db and reboot.

Wish I had a better answer for you. 🙃

Cheers. :cowboy:
[Android Apps and Games] DiamondJohn:
I oerssonally havent used adaway for some time and even when I did I did not have to re-configure it more than once or twice. Bur I have a vague memo9rythat there is a setting within adaway that configyures the destination loacation of the host file. It appears magisk may be set up to accept and use the file, but adaway hasnt been told that thats where it needs to place the file. As I said, I havens used it for a while, but I would also check your physical config files ofadaway. to check the correct setting is stored.
[Android Apps and Games] zgfg:
Actually, I don't recall that setting in AdAway 5.x and I think it has been commented here or under issues on GitHub that setting was removed to prevent troubles for users playing with, not understanding what is SAR read-only (where 'changing' path will not help to writing to the system hosts file), how Systemless hosts in Magisk works (and where it saves - always to /data/adb/modules/hosts/system/etc/hosts), etc

If I recall correctly, AdAway will check if Systemless hosts is enabled and it will use that part, otherwise it will try to use /system/etc/hosts (and maybe /etc/hosts)

I have also checked Preferences in AdAway 5.12 and attached its screenshots, there is no such setting to define target hosts file path

Unfortunately, when you go to Show help and tips, then it opens an outdated Help page, mentioning there the non-existent setting and even the wrong /data paths for the hosts file
[Android Apps and Games] FlanjeUK:
You need to install a Logcat app from the PlayStore, here is a guide :)
[Android Apps and Games] hanschke:
can you both please do a text link for sending it to the phone and not typing it ;)
[Android Apps and Games] FlanjeUK:
You will find all my host sources here

Apart from adblock.mahakala.is (which is MoaAB) :)
[Android Apps and Games] Lownita:
Those adblock lists do not work on android, they are no hosts lists. Just build the file from them, open your hosts file and you'll see it's empty.

Tapatalked from my Nexus 5
[Android Apps and Games] fiz:ik:
Oh :(
[Android Apps and Games] Dakloos88:
Does anybody know if host file apps like AdAway slow down your Android device?

Because what I know from Windows is that when working with large host files results in high cpu usage spikes. But you do not read anything about that here. Anybody got any experiences with this?
[Android Apps and Games] charesa39:
I don't see any slow down whatsoever on my Nexus 5. In fact, things like web pages in Chrome load quicker because it's not wasting time loading any ads. I don't think Adaway should slow down your device since it's not constantly running. All it's designed to do is replace the host file when you decide to update said file. I just leave the "Check for updates daily" setting unchecked. Although, I'd imagine that wouldn't have much effect on the speed of the device as it would only check for an update once a day.
[Android Apps and Games] rseiler:
It's not the app but the size of the resultant file that has the potential to slow things down. I'm not sure if it matters as much here as it does on Windows.

Like in the ginormous screenshot a few posts up, it's overkill and probably self-defeating to add and check every single host list known to man. Doing this also increases the chances of breaking sites. Pick a couple good ones.
[Android Apps and Games] FlanjeUK:
Having the 'overkill' set up has always worked for me ;)

Even my massive 17mb host file doesn't slow my phone down (as previously suggested, it's faster if anything) considering the host file created by AdAways default host sources is less than 2mb I can't see that slowing a phone down...
[Android Apps and Games] Dakloos88:
I think it is certainly true that ads do slow a device down. But I think large host files do too. It would be nice if someone could like benchmark the usage of ad-away in relation to usage without it. And then also the usage of ad-away with very large host files (multiple sources) versus just the general one, combined with that in your own language.

I am keen to know if there would be a difference in Antutu benchmark scores between these different mentioned setups.
[Android Apps and Games] jimdent:
It is a good app.

And I dont see any slowness
[Android Apps and Games] :
I'm having an issue with adaway partially applying host sources. It says 5/5 sources successfully applied (4 default ones and my short 4kb dropbox list), but then I see ads on sites which previously was blocked when I used adaway the same way as before. I tried rebooting, reverting to default, reinstalling adaway, but none really fixed it, it's still half-blocked for some reason.
[Android Apps and Games] andypiznti:
Been using this for years. Thanks for continuing to update!!