yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] ipdev:
AdAway works with and without root access.

View attachment 5872281

- Root mode writes to the local `hosts` file.

- VPN mode channels data though a local (device based) VPN.

---

Setting dns to `dns.adguard-dns.com` is an option but, you give up control over what is blocked and what is not. 🙁

Using AdAway in VPN mode, you still set the hosts sources and can still use personal allow/block lists for fine tuning. 🙃

Cheers. :cowboy:
[Android Apps and Games] zgfg:
True, but also knowing the instability issues when running AdAway in the non-root/VPN mode
[Android Apps and Games] PerfectSlayer:
Hi all,

Long time no see release! Months passed so fast: Got a new job, a better health, and it's now 8 months since the last release...

Truth is, this update required time and energy to upgrade the app to Android 13. But now, you should have things like adaptive icon and notification runtime permission, in addition to the usual library and build tool upgrades 😉

Changelog:

Add adaptive launcher icon

Add POST_NOTIFCATIONS runtime permission support

Improve settings UI

Update target SDK to Android 13

Update libsu

Update mongoose web server

Update AndroidX libraries

Update third party libraries

Update Android gradle plugin

Update NDK

Download:

AdAway 6.1.0
[Android Apps and Games] leonidasZ953:
We all thank you for you hard work..!!God bless you
[Android Apps and Games] Yuan Xi:
whether the current Material You icon can be changed to a filled-type icon?

The current icon is inconsistent with the MY icon style of other applications such as google, twitter
[Android Apps and Games] Abdel1993:
Good to see that your health is better then before. That's always the #1 thing in life. Keep it up mate!
[Android Apps and Games] Styrofoam Boots:
I'm encountering an strange error, I installed AdAway on my new nonroot phone (samsung m53), I decided that I'd rather patch the apps I use than to use the VPN option, the thing is, after I uninstalled it I couldnt connect to any wifi, I tried to install it again and my wifi started working again, so, for now, I let the app "on pause" and wifi works... Also, strangely, on safe mode I couldnt connect to wifi either.

Thanks for the replies!
[Android Apps and Games] gallegonovato:
Good afternoon @PerfectSlayer @ipdev @zgfg

I happen to be assisting in the translation of Adaway. And I came across some strings that have an exclamation mark inside a triangle. That is a warning sign.

I look at it and between the source string and the translation there was. There is variation in the numbers.

I made some suggestions just in case I'm wrong about what is wrong. Because it is strange to me that these strings were already old and were unmodified.

I upload some screenshots so you can see better what I mean and make sure if I'm wrong or not:

View attachment 5875369

View attachment 5875373

View attachment 5875375

View attachment 5875377

View attachment 5875379

A hug
[Android Apps and Games] docluv01:
Hey guys, have the latest magisk canary build sis systemless hosts enabled. i updated to the new adaway apk and I cant get past the syncing screen "Failed to sync". any suggestions?
[Android Apps and Games] gallegonovato:
Good afternoon @docluv01

Try removing Magisk Canary and try normal Magisk: https://github.com/topjohnwu/Magisk/releases/tag/v25.2

Best regards
[Android Apps and Games] docluv01:
thanks for quick reply

Unfortunately, when I try rolling back to that version, the magisk app force closes a LOT.
[Android Apps and Games] zgfg:
The safest way will be to fully uninstall Magisk and to install Stable v25.2 or Canary v25206 from scratch

Unfortunately, support for systemless modules is broken in the latest Canary v25210 (even partially broken since v25207) - it was warned here few weeks ago when Canary v25210 was released

---

Only if you have your boot.img patched by Stable v25.2 or Canary v25206 (you could also try with v25209) then you can cut (and avoid configuring modules and everything from scratch):

- uninstall Magisk app Canary v25210

- reboot to flash your old, previously patched boot img with that older Magisk

- reboot and install the corresponding old Magosk app
[Android Apps and Games] stephtban:
Hello,

Will the latest 6.1 version be available on f-droid ?

Thx
[Android Apps and Games] Cipcino81:
Hello,

lately adaway is blocking Google podcast images , I have tried with DNS log, but I have allowed anything and still images are not displayed. Can you help me to pinpoint what I need to allow ?
[Android Apps and Games] gallegonovato:
Good afternoon @PerfectSlayer @ipdev @zgfg

In the AdAway translation I come across this string:

Unable to copy hosts file to your system partition. Please check Magisk systemless module is enabled then reboot.

And I put it right, but they change it.

But my advice would be:

don't translate or change the part: Systemless Hosts in Magisk . Because Systemless Hosts is what the creator of Magisk calls it and this add-on is in Magisk.

So it doesn't take error what to look and where.

I don't know what you think?

I put a comment in that string in transifex but if it is not ok I comment it here.

A hug and thanks for your time and help.
[Android Apps and Games] Nergal di Cuthah:
Do you have a lot of lists. Root adaway does nothing but download and collate sources, it shouldn't be resource intensive unless yoi have a lot of lists (even then shouldn't be heavily used cpu)
[Android Apps and Games] useroso987:
Hi.

I've tried Adaway not root and it has like 200k domains blocked.

Then i rooted and reinstalled Adaway, and with the root it has 0 domains blocked. So, is it not blocking anything?
[Android Apps and Games] useroso987:
Great! I cleared the app data and the 195k domains blocked are back. Thank you.

Should i keep the app "ON" (scanning) 24/7, right? I use it with Netguard VPN.
[Android Apps and Games] chairman011:
How can I take this off besides deleting the app? It's interfering with a lot of things not only blocking ads but it's freaking blocking everything lol how to I disable it completely
[Android Apps and Games] m0han:
Restore default hosts. Reboot and you should be fine. Uninstall AdAway if you don't want it on your device.
[Android Apps and Games] chairman011:
Yeah it's a no go for me it didn't work. If i re-flash boot.img will it go back to normal? I mean it's no big deal but I can't even complete a captcha with this on so I can't go past that in certain websites.
[Android Apps and Games] Danny1976:
New Magisk update out. Does anyone know if it's still affecting systemless modules and adaway. I downgrade from 25210 to 25209 to fix adaway. The new Magisk is version 26001 and was wondering if anyone has updated without any Adaway issues.
[Android Apps and Games] Nergal di Cuthah:
Nope it works take the update
[Android Apps and Games] spacedrone808:
Do anybody run into situation when it looks like that application is always unloaded and loads only per manual execution? After which system make toast that application granted root permissions. In a 3-4 hours i can excecute Adaway again with the same notification as if app wasn't already loaded.

Android 8.0 version from 2018 .

Rooted stock rom.

Sony Xperia XZ1 Compact.

Adaway was added to exeptions in battery optimization setting. Allowed run in background.

Any ideas?
[Android Apps and Games] zgfg:
AdAway root mode has nothing to do with Battery optimization.

AdAway must only be running while updating hosts sources

After the hosts sources are updated and phone rebooted (!!!), AdAway can be fully force-closed

Until the next time you want to update the hosts sources - and then you can manually run AdAway

AdAway in the root mode only writes to the copy of hosts file at: /data/adb/modules/hosts/system/etc

On the next reboot, Magisk mounts that file to the 'real' /system/etc/hosts and then Android itself takes care to use the modified hosts file for DNS resolving

Make sure you don't run another ad-blocker using the hosts mode and that Systemless hosts in Magisk is enabled (after that phone must be rebooted, AdAway must update the hosts sources and phone must be rebooted again)

---

Above description applies only to the root/hosts mode, not to non-root/VPN mode

In the VPN mode, AdAway must be running the virtual VPN all the time...
[Android Apps and Games] spacedrone808:
Thanks for super comprehensive explanation!
[Android Apps and Games] zgfg:
Today I tested dmFree WLAN in another shopping mall

Again, the same, immediately when connected to their WLAN, local hosts file is ignored, hence the ads sites DNS names become resolved by DNS, and ads are showing elsewhere in the Chrome (but again not in the other apps)

I checked the received DHCP settings - screenshots
[Android Apps and Games] zgfg:
I GOT IT!

Came home and I didn't even change settings on my home WLAN

Just went to the native WiFi settings on the phone, changed from DHCP to Static, and changed the DNS server from my IP provider's DNS server address to Google's public DNS server 8.8.8.8 (as on that dmFree DHCP settings)

Then immediately my Chrome started to show ads

Somehow, when Chrome realizes that DNS server (this is not Private DNS server setting) is set to 8.8.8.8, it starts ignoring the hosts file

Edit:

Hence I came back to the DM shop (caffee nearby), opened WiFi settings, dmFree and switched from DHCP to Static

For the beginning it offers the same config that was pushed by DHCP

I changed DNS servers 1 and 2 from Google ones 8.8.8.8 and 8.8.4.4 to the ISP DNS servers (I checked who is the ISP for dmFree and set their DNS servers)

Now Chrome does no more push ads on the dmFree WLAB

I drove to the other DM shop, the phone automatically connected to dmFree there and it used that Static config (DNS servers) that I saved earlier

Hence for now, I shall have no further problems with ads in the various DM shops. My phone should use that static config with the ISP DNS servers instead of Google's DNS servers, and in that mode it will correctly block the ad sites redirected to 0.0.0.0 by the hosts file
[Android Apps and Games] Tidewater:
Does anyone here use the VPN non root version? If so, how well does it work?
[Android Apps and Games] gallegonovato:
Good afternoon:

I wanted to ask you, if I may. If the last version of Adaway works well with the last version of Magisk 26.1

Having Adaway in rot mode

It is that I notice as if it stops when updating the sources of the hosts. Having WiFi or data coverage. Because it happened to me that it stayed in a source that did not come out to update, but as if Adaway was updating it. But it did not always put updated for 2 months. And Adaway did not mark it as needing to update. Since it always said updated

Thanks for your time and help.
[Android Apps and Games] Wolfcity:
I can confirm that latest AdAway is working well (as with 25.x) with Magisk 26.1 stable.

I'm not sure if I understand your update problem. I have AdAway configured to search for updates and synchronize on a daily base and that's what it does. No stopping or anything like that.

Edit: Manual update is working on mobile data as well as on WiFi.
[Android Apps and Games] m0han:
Three sources not updating on Data, but updating fine on Wi-Fi. What could be the reason; the large number of hosts? But, another source that has 201k hosts updates fine on Data.
[Android Apps and Games] zgfg:
Check in your native Settings do you have any restriction like per app (and per day) or something for AdAway

Copy the hosts file URL to browser and try to open while connected to Mobile Data (I would guess, you tried things like that)

Use Terminal emulator and commands:

su
cd /sdcard/Download
wget https://raw.githubusercontent.com/jerryn70/GoodbyeAds/master/Extension/GoodbyeAds-Xiaomi-Extension.txt

like on the screenshot - wget will download the particular hosts file to Download folder - that way you can check if there are any restriction on the Mobile Data site (per address or per the hosts file size) for that hosts source file

For wget command you will need BusyBox module installed
[Android Apps and Games] m0han:
No

Yes. All 3 open fine.
[Android Apps and Games] zgfg:
Hmm, open an Issue on GitHub and attach Logcat traces for those hosts sources that fail to update on your Mobile Data. Maybe the dev could find something
[Android Apps and Games] ze7zez:
Is it known why the sources contain different source files?

The difference is in app/build.gradle.
[Android Apps and Games] Oswald Boelcke:
Could it be because by my information F-droid builds and signs it?
[Android Apps and Games] ze7zez:
Version 6.1 from Github has 14,464,023 b,

and the version from F-Droid has 15,763,963 b.

Can signing the app take about 1 MB?
[Android Apps and Games] Oswald Boelcke:
Excellent question. I don't know.
[Android Apps and Games] ze7zez:
Also, you can see that the F-Droid version has corrupted/changed (?) file names.

Spoiler content hidden.

edit.

File name shortening was caused by a bug in 7-zip 18.05. In version 22.01, .gz file extraction works fine.
[Android Apps and Games] DiamondJohn:
I have a different problem, that is related. On my WiFI I have fixed IP (for network firewall passage) and set the DNS to 1.1.1.1 & 1.0.0.1 (havent used nor tested google DNS for a while, but I dont remember issues of it skipping the host file) and host blocking works perfectly with a massive host file. However, as soon as I leave WiFi and switch over to my Vodafone network data, the host file is ignored, and all the ads return :mad:

On previous devices with writeable system partitions and running earlier version of Android (Oreo was previous daily), I changed the DNS for all network interfaces in the build.prop with a boot script, and the host blocking worked (otherwise it defaulted to a Vodafone DNS on mobile data and the hosts file was ignored). When I get around to it, I am going to look into making a Magisk Stemless module to insert lines into the RO build prop; similar to how I used to do it in Oreo but systemlessly, and hope it is still being read by the OS.

I also tried and am running the "Private DNS provider hostname" feature within A11. But that seems to be ignored on mobile data. I use dns.adguard.com which I would think would block at least some ads . Wouldn't know on WiFi, as the host file is pretty darn thorough, and it isnt ignored.Spoiler content hidden.

UNLESS someone else has another fix for the same problem? ie host file ignored when it switches to mobile data.
[Android Apps and Games] DiamondJohn:
I dont think the signing would not be the process that that changes the file size. F-Droid at least used to compile all apps from source. Compiling an app can make big changes the compiled APK. For example, they *could* use different NDK versions; but in that case I would assume they both use the latest stable, its simply an example that the same code can result in different APK sizes..
[Android Apps and Games] zgfg:
Interesting. For me hosts file is used on Mobile Data and if I set Private DNS, it is also used (but as I checked, my provider's DHCP does not push 8.8.8.8 for DNS server)

Can you check in Settings, SIM cards, Advanced setting, what is your DNS server when you are on Mobile data - ie, are they 8.8.8.8 and/or 8.8.4.4 (Google DNS servers).

My screenshot attached

And can you pls try when you're on WLAN, go to WiFi, tap to the right of the current connection, scroll to IP settings and change from DHCP to Static.

Then keep everything as is but put 8.8.8.8 for DNS server (screenshot) to see if your Chrome then ignores the hosts file
[Android Apps and Games] PerfectSlayer:
The behavior with Chrome you both describe is really suspect. Thanks for keeping investigation about it.

I hope we can pinpoint the issue that make the hosts file ignored...

Can you enable debug log from settings, restart the app, reproduce the download error using data, and share a logcat?

The F-Droid builds bundle sentry library where the GitHub release only has stub. The telemetry is an opt-in feature (you need to enable it on purpose for the library to be initialized, and even the opt-in mechanism was broken from v5 release, meaning enabling it from welcome screen did nothing).

By the way, I just enable the v6.1.0 F-Droid variant in built-in updater. Enjoy!
[Android Apps and Games] m0han:
Can't enable. Debug: Send crash reports - Not supported on this build! AdAway-6.1.0-20230326.apk (md5: 56b4ac19592e56c3400d46bea262948b)
[Android Apps and Games] vijaytechno21:
Can someone plz help me as i whitelist some sites but still it blocks..
[Android Apps and Games] Nergal di Cuthah:
Are you whitelisting the main url (e.g. Cnet.com) or the ad servers?
[Android Apps and Games] zgfg:
Btw, which properties do you mean changing by the module - Cloudflare DNS servers like here?

Android build.prop tweaks

Android build.prop tweaks. GitHub Gist: instantly share code, notes, and snippets.

gist.github.com
[Android Apps and Games] DiamondJohn:
In the attached script, I set the values for the list, by looping through the strings:

net.dns dhcp.wlan0.dns net.ppp0.dns net.rmnet0.dns net.rmnet1.dns net.pdpbr1.dns net.eth0.dns net.rmnet2.dns net.wlan0.dns net.gprs.dns

and do the 1 & 2 for each. So I am setting the DNS on more internet interfaces than the link

net.gprs.dns is one I just found and added to my old script, to no avail :(.\

EDIT: I extended it further to add the logical net interface of lte. & 3g net interfaces

net.dns dhcp.wlan0.dns net.ppp0.dns net.rmnet0.dns net.rmnet1.dns net.pdpbr1.dns net.eth0.dns net.rmnet2.dns net.wlan0.dns net.eth0.dns net.gprs.dns net.hspa.dns net.lte.dns net.ltea.dns net.wcdma.dns
[Android Apps and Games] zgfg:
I checked in Terminal emulator but I did not not have any of those props - screenshot

I put the attached (it's zipped) system prop to:

/data/adb/modules/hosts

rebooted and checked again - screenshot, props were applied accordingly (and systemlessly)

I checked then for WLAN and LTE but they still use DNS servers pushed by their DHCP configurations - screenshot

You could rename your script to service.sh and put also to the Systemless hosts folder, just make sure to use resetprop -n as required in TJW documentation:

Developer Guides

The Magic Mask for Android

topjohnwu.github.io
[Android Apps and Games] DiamondJohn:
I checked the doco and the -n param is only suggested for post-fs-data scripts to avoid blocking. My scripts IS already run in service.d mode, so are non blocking by def. And My logging shows the values have been changed and are not blocked; the next script line is immediately executed, when it checks the value straight after setting it.

Interesting thing I did not mention in my last post, since adding in the DNS settings for LTE network interfaces, the log file is showing that the DNS for "net.dns" is not flipping back, BUT the ads still come through on mobile network and hence the hostfile is clearly being ignored. I think I need to call my service provider and see if they can explain why my protection against hackers is being broken by their network service. I dont expect any knowledgeable help from the people who answer the phone as technical help.

I did also notice in the docs that the setprops can be done with a module file instead of with a script, so I might try that, but the logging in my script makes it clear the code call IS working, espoecially since I added the LTE interface DNS changes
[Android Apps and Games] zgfg:
I attached system.prop version in my prev post
[Android Apps and Games] DiamondJohn:
My script covers all the network interface in your file plus a number more.
[Android Apps and Games] m0han:
@zgfg, Not to derail your ongoing discussion, but are you able to enable debug log? Any solution? @PerfectSlayer
[Android Apps and Games] Wolfcity:
Same problem here.

No crash reports possible,Verbose logging is working.

(version 6.1.0 from internal updater, XDA).

MD5

56b4ac19592e56c3400d46bea262948b
[Android Apps and Games] PerfectSlayer:
@m0han @Wolfcity

Verbose logging will enable detailed logging. It requires an app restart to be applied.

The second option is the opt-in telemetry. As discuss earlier, it is not available on GitHub build, only using F-Droid build and will mainly report crashes.

In your case, I am interested to get the detailed log so you will have to capture it using logcat (either with adb command if you are comfortable with it, or using an app like MatLog).
[Android Apps and Games] m0han:
I am interested to know if it's because I hadn't enabled verbose logging and restarted the app that I wasn't able to enable 'debug log'. Why was that setting greyed out (inactive)?
[Android Apps and Games] ipdev:
You are not the only one to notice the hosts file being ignored while on Mobile Data.

I mentioned it last year. 😉

I haven't had the time to look more into it. 😥

Cheers. :cowboy:
[Android Apps and Games] DiamondJohn:
Actually, I just realised a question I overlooked.

Did you have the similar issue of the host file being ignored, which was then corrected by using the system prop file? or is that change for other reasons? Or to put it another way, if you remove the system prop file, does it revert to ignoring the host file while on mobile data?
[Android Apps and Games] zgfg:
In that post #17350 I wrote:

I put the attached system prop to:

/data/adb/modules/hosts

rebooted and checked again - screenshot, props were applied accordingly.

I checked then for WLAN and LTE but they still use DNS servers pushed by their DHCP configurations

Hence, all those properties were applied by system.prop but ignored, and both on WLAN and LTE my phone continued to use the DNS servers pushed by their DHCP, not the Cloudflare DNS servers 1.1.1.1 or 1.0.0.1 from the properties

I don't have problem on Mobile Data but only on a particular WLAN. I didn't test on that dmFree WLAN that pushes Google's DNS 8.8 8.8 server by DHCP, but I tested on my home WLAN and as described above, properties did not enforce Cloudflare DNS servers to be used by the connection

Edit:

I found now at work an alternative WLAN (5GHz) that pushes DNS 8.8.8.8 by DHCP

I tested with nsswitch.conf and system.prop but no help, Chrome shows the ads elswhere
[Android Apps and Games] zgfg:
Btw, I tested also (reported earlier but in another thread) with nsswitch.conf file (attached and zipped)

I added the file to:

/data/adb/modules/hosts/system/etc

Upon rebooting, Magisk mounts the file to /etc/nsswitch.conf

I don't have a Linux to test but accordinglt to what I found by googling, that nsswitch.conf file is used on Linux systems and the line inside:

hosts: files dns

should enforce that the /etc/hosts file has a precedence over the DNS server

I tested on my phone on that dmFree WLAN where hosts file was ignored but it did not help - ads were still showing in Chrome as that ad sites were not blocked, ie not redirected to 0.0.0.0 (I tested also with 127.0.0.1 in the hosts file, and using also the corresponding IPv6 redirections) as in the hosts file generated by AdAway
[Android Apps and Games] DiamondJohn:
Looking into the nsswitch.conf file I also came across another file "resolve.conf"

# /etc/resolv.conf
# Generated by NetworkManager
search domainname.local
nameserver 1.1.1.1

Neither already existed on my A11 ROM. I added them in and they got mounted, and then dutifully ignored.

Reading the contents of the nsswitch.conf you found, really gave me hope as the location where it can be explicitly forced. The only thing that made me weary was that I was getting different behavior's on WiFI to mobile data, and there was no structure to act differently on the different networks (as I typed that I realised it would not support having different name servers on different WiFi networks, which can be done using the GUI). But I was hoping that explicitly declaring it to check the host and then the DNS would override any funky behavior's. Sadly, not.