[Android Apps and Games] zgfg:
Warning: Looong post

This post is exclusively about AdAway in the root/hosts mode (with Systemless hosts since I have A12), please don't quote and follow about the non-root/VPN mode

Frankly, I never fully believed to those who claimed they set up everything correctly (with all reboots and so) but that they still see ads

Until two weeks ago, when I found the ads suddenly not being blocked while shopping in DM (Drogerie Markt), on their dmFeee WLAN connection

A week later I came back and also with my second phone, I ordered a coffee and tested more carefully. Results were systematic and reproducible but even more mind-blowing

I came once again today, with a pen and a paper, to make sure that I go through all scenarios couple of times (back and forth, usually with rebooting in between), specially through the 'unbelievable' cases

Now I can give my hands that results (you like them or not) are 100% reproducible on my phones

---

Remarks:

I use AdAway since 2017 or so, it's one of the main reasons for rooting my phones. Hence I'm not a newbie here

I tested with Chrome (always the latest), and I restricted my tests to three local news portals that immediately pop-up ads from their main pages. Or if the ads are successfully blocked, they render empty boxes instead (on one even saying the ad should come there, and spinning a wheel on the other, as if still waiting for the ad to be downloaded)

Similarly, I tested with three apps where I could also easily see and with no doubt if their ads were blocked or not. Eg, Speed Test by Ookla - the add is always shown upon measuring the connection speed, and otherwise it displays an empty box if the add was blocked

---

I don't think that problem is in the AdAway or Magisk/Systemless hosts side since I opened several times the /system/etc/hosts file and always properly found that hosts file was patched by AdAway (I have automatic updates disabled in the AdAway, hence the hosts file was always blocking exactly the same 31K sites)

Something seems to be fishy with Chrome and how Chrome, under some (but reproducible) circumstances.relies on resolving DNS names through the local hosts file or not

---

Honestly, I have two devices but on my older MIUI 12.5/A11 phone, the ads are always successfully blocked (unless I really pause AdAway and reboot)

On my primary phone with MIUI 13/A12, the ads are not blocked under the particular and strange circumstance but that happens only in Chrome.

In the apps (eg, those three I described the tests above), the ads are always blocked except if the AdAway was paused and phone restarted

Also, I tested with IPv6 enabled or disabled in AdAway and both by redirecting the blocked sites to 0.0.0.0, and :: for IPv6, and to 127.0.0.1, and ::1 for IPv6 - but that changes made no differences (upon rebooting I always inspected if the hosts file was re-patched according to my IPv4/IPv6 changes)

---

I don't use custom Private DNS like dns.adguard-dns.com - in that case AdGuard would be always successfully blocking the ads (even if they were not blocked by the patched local hosts file). Hence that case is out-of-scope here

On my daily driver with A12, I must use Private DNS set to Automatic - if Private DNS is set to Off, then Chrome (force-closing and reloading the page is enough), immediately starts showing the ads

However, and even more odd, switching between Private DNS Off or Auto does not affect ads in the apps

Moreover, on that older, spare phone (believe me, I tested everything several times), Private DNS Off or Auto does.not affect ads in the Chrome (neither in the apps)

I repeated that same tests for several days, on the WLAN at home, at work, various public and private WLAN networks and on 4G and 5G Mobile Internet (two providers) - always having the same results, particularly that Chrome stops blocking the ads (and only on my newer phone) whenever the Private DNS is switched from Auto to Off

---

Finally, on their local WLAN in that DM shop (I shall probably go to test in the other DM shops in town), Chrome completely stops blocking the ads, no matter if Private DNS is Off or Auto

But ads are still correctly blocked in the apps.

And on my older, spare phone - ads are always correctly blocked, even in the Chrome and on that dmFree WLAN network

---

It was not a bad dream and otherwise my mind is still okay (I believe so)