yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] ipdev:
[MENTION=1099255]mariosaraylian[/MENTION]

From the steps you describe.

I didn't see you mention AdAway requesting and gaining root access.

I haven't run into it lately, for me, it was always Magisk related.

All other apps / modules seem to work fine but, AdAway always showed me when my Magisk install was broken.

I know I've seen others mention just being able to toggle SU on or off/on for AdAway in Magisk's Superuser settings. If you take a look at the log file in Magisk, you should see a su request once or twice while AdAway is updating (or attempting) to update the hosts file.

[MENTION=6617276]ktmom[/MENTION]

May be a change coming down the line but, for now I would still recommend enabling the magisk systemless module.

Just tried on my Pixel 3aXL with Magisk systemless hosts module disabled.

Looks like systemless hosts still have to be enabled in AdAway.

The hosts file is updated but can not be viewed in AdAway.

After a reboot the hosts file is back to stock and systemless in not enabled in AdAway. With the Magisk systemless hosts module enabled, AdAway works just just like it should.

(3aXL is running stock 10 and rooted with Magisk canary-debug.)

Cheers. :cowboy:
[Android Apps and Games] ktmom:
I'm pretty convinced we'll be in a confused state with all of the different combinations of devices, software and Magisk for awhile.

While I'm on Magisk 19.3, Pie and a Pixel 3XL, my experience is very different from yours. Without systemless hosts enabled in Adaway and without systemless hosts in Magisk, I can modify and view the hosts file and after multiple reboots, everything sticks. In this case, the file is in /sbin/.magisk/mirror/system/etc

Originally, when I tested, the file was modified in the mirror directory regardless of the enabled/disabled state of the Magisk systemless hosts module.

However, if the systemless host module in Magisk is disabled, and the systemless hosts settings in Adaway is enabled, the file gets put in /sbin/.magisk/modules/.core

BUT, when I just reinstalled the systemless hosts module and rebooted (yet again), now the hosts file is placed where you would expect; /sbin/.magisk/modules/hosts/system/etc

I'm thinking that what you upgrade from/to plays into how the glitches settle out.

While I am on an "older" Magisk release, I don't think using the bleeding edge channel is a good baseline either. [emoji6]
[Android Apps and Games] ipdev:
I'm curious also.

I have noticed slight differences on device(s) when updating Magisk versus a clean flash before. (OT here.)

I did clean flash my 3aXL last week. Installed magisk and enabled systemless hosts module. Never installed AdAway until tonight after I disabled systemless module and rebooted.

I'll try to find sometime this weekend to test on a few other device.

Some are new SAR bring-up so Magisk stable 20 will be the only option on those.

Will let you know what I find out. :)

Cheers.
[Android Apps and Games] mariosaraylian:
Android 8.0.0 on Magisk 20.0 (20000)

I am kind of lost now because Systemless Hosts in Magisk has always been on, as well as in AA.

---------- Post added at 12:43 AM ---------- Previous post was at 12:37 AM ----------

ipdev:

I see the SuperSU prompt working fine for SuperUser Rights working just fine. I see the toast prompt and it is toggled ON in Magisk.

I am seeing conflicting information here on everyone's suggestions. Should I maybe uninstall Magisk all together and reinstall it, or just uninstall the Systemless Hosts Module in Magisk, Reboot, Clear Data in AdAway, reboot, and turn on Systemless Hosts in Magisk again, then reinstall Adaway and try again...????
[Android Apps and Games] Hifexar:
DNS Log

Hi!

I use Adaway 3.2 for several years. Looked full changelog, and did not see the change necessary for me in the latest version 4.2.9.

Can the developer add a log of blocked DNS records? This is sorely missed.

I do not use sources of hosts from a network, I add records only manually. And my own list is very large several hundred entries. And sometimes, something doesn't work because it has blocked something that is needed rarely and only for a specific situation. And then it is very difficult to find in the whole list the reason why it does not work. One by one only. It is very long and time consuming. But the log of the blocked records would allow to solve such problems very quickly! And from it it would be possible to form a white list. Which would be much shorter, and whose records need to be activated only occasionally.

Please add the log records are blocked, it is very necessary!
[Android Apps and Games] ktmom:
You are an example of the complexity of the problem. You do not have a system as root (SAR) device*, but are on Magisk 20. I think this is the core of your problem.

I personally would be interested in what would happen if you deleted the systemless hosts module itself, rebooted, then tried to install a hosts file. It will error out again I'm sure.

Then re-enable systemless hosts which should download the module again, reboot and try again with Adaway.

If that doesn't work, I would revert Magisk to 19.3 (which was still a SAR A10 fix) or earlier. I'm sure that will work.

*SAR devices are all minimally released with 9.0

---------- Post added at 08:29 ---------- Previous post was at 08:27 ----------

This exists. It's called DNS logging.
[Android Apps and Games] Hifexar:
.

In my Adaway 3.2 this DNS log does not display domains that are already blacklisted. And I need to detect attempts of applications to make DNS request which domain is already in the black list. That's what I need.

DNS Log does not allow this now. Or in 4.2.9 the log works differently, not as in 3.2?
[Android Apps and Games] ktmom:
That would be called white listing and yes, this has worked for a long time. Did you carefully read that page?
[Android Apps and Games] Hifexar:
For example, it can be implemented like this:

1. Change in Adaway 127.0.0.1 to 127.0.0.5 for forwarding.

2. Run the tcpdump:

tcpdump -i any -s 0 host 127.0.0.5 -w /tmp/dnsblock.pcap

3. generated some traffic, for example, so:

wget 44444.ru

where 44444.ru is blacklisted by Adaway

4. We get in the dump something like:

16:08:55.446532 IP 44444.ru.35318 > 44444.ru.http: Flags , seq 3975137463, win 32792, options [mss 16396,sackOK,TS val 3364337500 ecr 0,nop,wscale 7], length 0

16:08:55.446563 IP 44444.ru.http > 44444.ru.35318: Flags [S.], seq 1338750778, ack 3975137464, win 32768, options [mss 16396,sackOK,TS val 3364337500 ecr 3364337500,nop,wscale 7], length 0

16:08:55.446587 IP 44444.ru.35318 > 44444.ru.http: Flags [.], ack 1, win 257, options [nop,nop,TS val 3364337500 ecr 3364337500], length 0

16:08:55.446633 IP 44444.ru.35318 > 44444.ru.http: Flags [P.], seq 1:107, ack 1, win 257, options [nop,nop,TS val 3364337500 ecr 3364337500], length 106

16:08:55.446662 IP 44444.ru.http > 44444.ru.35318: Flags [.], ack 107, win 256, options [nop,nop,TS val 3364337500 ecr 3364337500], length 0

16:08:57.553569 IP 44444.ru.http > 44444.ru.35318: Flags [P.], seq 1:619, ack 107, win 256, options [nop,nop,TS val 3364339607 ecr 3364337500], length 618

16:08:57.553599 IP 44444.ru.35318 > 44444.ru.http: Flags [.], ack 619, win 266, options [nop,nop,TS val 3364339607 ecr 3364339607], length 0

16:08:57.553689 IP 44444.ru.35318 > 44444.ru.http: Flags [R.], seq 107, ack 619, win 266, options [nop,nop,TS val 3364339607 ecr 3364339607], length 0

5. Select domains from the text, remove duplicates, and save log:

cat /tmp/678.pcap | grep "http >\|https >"| awk '{print $3}'|sed s/.https/""/|sed s/.http/""/|uniq > /tmp/dnsblocklog

6. Result:

[root@xxxxxxxxxx etc]# cat /tmp/dnsblocklog

44444.ru

You can also apply some sort in the command.

This is an example way. Developers please add this feature. You'll probably do much better than I suggested.

---------- Post added at 04:19 PM ---------- Previous post was at 04:11 PM ----------

Sorry for my bad English, maybe I don't understand you or you don't understand me.

Version 3.2 100% doesn't have what I'm talking about. I have not yet installed, 4.2.9, if there is something changed, it is good, if not, we do not understand each other.

In changelog, such a feature from 3.2 to 4.2.9 was not declared.

Later I will specifically update the version and see for myself.

P.S. I installed 4.2.9. And there is no such log, about which I spoke!!! There is no such functionality!

Moreover, in version 4.2.9 became just a terrible interface! Very uncomfortable. Usability has deteriorated greatly. I'm going back to version 3.2.
[Android Apps and Games] Hifexar:
Upgraded the algorithm.

1. Change in Adaway 127.0.0.1 to 127.0.0.5

2. Run the tcpdump:

tcpdump -i any -s 0 dst host 127.0.0.5 -l -t -q > /tmp/dnsblock.pcap

Now you can not turn off tcpdump, as in Adaway.

3. Getting a list of hosts that are accessed by applications and that are already added to the Adaway blacklist. Оne command.

cat /tmp/dnsblock.pcap | grep "http: \|https: " |awk '{print $4}'|sed s/.https:/""/|sed s/.http:/""/|uniq

Here is such would add in Adaway. Or do something different.
[Android Apps and Games] Pip_X:
Magisk Manager 20.0, enabled Systemless Host, Adaway 4.2.9.

It doesn't prompt for root request.

In Magisk's superuser app list, Adaway doesn't appear.
[Android Apps and Games] ktmom:
Do you have hide Magisk Manager enabled?

Also try disable ad blocking in Adaway then re-enable it.

Was this an update of Magisk or fresh install? What device and OS?
[Android Apps and Games] Pip_X:
Hide Magisk Manager is not enabled.

I cannot disable ad blocking as it's not enabled

Fresh install of Magisk and Adaway.

Lenovo K5 Pro with GSI Linage 16.0 Android Pie 9
[Android Apps and Games] ktmom:
Do other apps request root access? Have you rebooted after installing everything? Have you tried grabbing a log while enabling ad blocking?
[Android Apps and Games] Pip_X:
Yes, File Manager such as Xplore requested for root and I can see it in Magisk Manager superuser app.

I have rebooted and clear Adaway data few times.

How do I grab the said logs?
[Android Apps and Games] ktmom:
Use an app like MatLog, and also turn on verbose logging in Adaway preferences.

Doesn't LineageOS have its own built in root? I thought it was just a mater of turning on root in Developer Options. If I'm right, maybe that's conflicting.
[Android Apps and Games] Ultramanoid:
Not by default. The preference is there but a simple extra zip with su must be installed for it to be available.

https://download.lineageos.org/extras

( Edit : While people are certainly free to install Magisk, Lineage does not support it since there is a native su option; when Magisk causes issues they're on their own. )
[Android Apps and Games] Pip_X:
I use Magisk because there are some modules I would like to use too.

I installed Matlog, it requested root and I managed to grant root to Matlog. But not AdAway.

Here's the log:
[Android Apps and Games] ktmom:
Adaway is asking for root. These are the relevant lines:

11-01 01:03:39.167 E/AdAway (9038): Failed to update hosts file.
11-01 01:03:39.167 E/AdAway (9038): org.adaway.model.hostsinstall.HostsInstallException: Root access denied
11-01 01:03:39.167 E/AdAway (9038): at org.adaway.model.hostsinstall.HostsInstallModel.applyHostsFile(HostsInstallModel.java:455)
11-01 01:03:39.167 E/AdAway (9038): at org.adaway.ui.home.HostsInstallViewModel.lambda$update$2$HostsInstallViewModel(HostsInstallViewModel.java:124)
11-01 01:03:39.167 E/AdAway (9038): at org.adaway.ui.home.-$$Lambda$HostsInstallViewModel$hr_O0jGNR8I8qQyGthIQYups81s.run(Unknown Source:2)
11-01 01:03:39.167 E/AdAway (9038): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-01 01:03:39.167 E/AdAway (9038): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-01 01:03:39.167 E/AdAway (9038): at java.lang.Thread.run(Thread.java:764)
11-01 01:03:39.167 E/AdAway (9038): Caused by: org.sufficientlysecure.rootcommands.util.RootAccessDeniedException: stdout line is null! Access was denied or this executeable is not a shell!
11-01 01:03:39.167 E/AdAway (9038): at org.sufficientlysecure.rootcommands.Shell.<init>(Shell.java:134)
11-01 01:03:39.167 E/AdAway (9038): at org.sufficientlysecure.rootcommands.Shell.startRootShell(Shell.java:54)
11-01 01:03:39.167 E/AdAway (9038): at org.sufficientlysecure.rootcommands.Shell.startRootShell(Shell.java:63)
11-01 01:03:39.167 E/AdAway (9038): at org.adaway.model.hostsinstall.HostsInstallModel.applyHostsFile(HostsInstallModel.java:439)
11-01 01:03:39.167 E/AdAway (9038): ... 5 more

I don't use LineageOS, so I'm not familiar with the potential conflicts. As a kick the tires type thing, I might completely remove Adaway and Magisk Manager (not unroot), reboot then reinstall MM and reboot before reinstalling Adaway.

---------- Post added at 14:13 ---------- Previous post was at 13:48 ----------

@Pip_X

In response to the above two posts:

Then there is this from earlier in the thread:
[Android Apps and Games] Pip_X:
It seems that other people who have the problem are on Android 10.

I'm on Android 9.

Some of the steps are too advance for me.

I shall wait for an update on AdAway.

Thanks

Edit: I used AdFree, it prompted for root and can apply the host. My phone is now blocking Ads. Thanks.
[Android Apps and Games] rwSN1PER:
After installing the Systemless Hosts module in Magisk 20.0, I am able to use AdAway 4.2.9 without issue on my OnePlus 7 Pro running crDroid 6.0.
[Android Apps and Games] PerfectSlayer:
Hi all,

I have been pretty busy the last weeks but I finally got some progress with Android 10 issues (it's a day off here, it definitely helps!).

Feedback:

Thanks for your log. Don't forget to enable verbose logging option from the settings and restart the app.

It will log shell commands so we can understand even better what happens on your device.

Thanks for helping users and me with troubleshooting!

I would also recommend to use Magisk systemless module if you are running Magisk as root solution.

I just update the app in order to improve its systemless feature for the latest versions of Magisk:

It should be able to check if the module is installed (the directory /data/adb/modules/hosts is present) and running (a mount point on /system/etc/hosts is present)

If you try to enable / disable it from the app, it brings a popup explaining how to set it up from Magisk manager.

I hope it will help users with the remount failed errors.

About the root access not requested, killfrra proposed a patch to no more try to find su binary from known paths but call it directly from PATH.

It is how work ChainFire's libsuper and topjohnwu's libsu so it should work. I just hope it won't break any compatibility (but I honestly don't think so).

I merged it and it should resolve root request. May be it remains some old su binary or broken link to it and the past behavior triggered the wrong one. I will rely on PATH now.

Changelog:

Fix root not requested

Improve support for systemless hosts Magisk module

Update translations

Thanks:

Special thanks to killfra for its contribution and all of you for theirs helpful bug reports. [MENTION=2148774]Vankog[/MENTION] also did a great work with translations.

Donations:

I was recently accepted in the GitHub Sponsors program. It is a way GitHub proposes to help Open Source maintainers.

I setup up the support tiers and rewards, like stickers and supporter list on the project README.

Here is the link to my sponsor page: https://github.com/sponsors/PerfectSlayer

I am kind of new to this kind of this and I honestly want to know what you think about it: the principle of monthly fee and the tiers I choose (Too expensive? Too cheap? Any reward idea?).

GitHub takes no fee and double the donation the first year so I though it was a good idea to try it.

For the record, since the call for donation from [MENTION=6617276]ktmom[/MENTION] last month I received 10 donations for a total of 54€ to pay the shipping taxes. Thanks a lot! :highfive:

Download:

AdAway 4.3.0 on AndroidFileHost (md5: 54bc1ab9aa83bcdb300de7e4bf7e6271)
[Android Apps and Games] amirovic26:
a suggestion

I like this ad blocking apps, because it's also featuring url redirection so i can access some sites that have been blocked by our government.

I have suggestions for the url redirection feature

Rather than adding one-by-one ip and domain/hostname, can devs make it looks like table/list

Also if possible can devs add feature "add host list from file or url"?

like from my redirection list

Thanks in advance :cowboy:
[Android Apps and Games] cujo6801:
Thanks .....

I know people hate when people clutter up the thread with thank you but sometimes you just have to say it
[Android Apps and Games] ktmom:
I hope that discussion didn't come across as, "don't use the systemless hosts module". We were (are) fascinated by the various update glitches [emoji846]

I love the idea of a subscription service. Those of us who rely on Adaway could certainly consider giving up a morning muffin once every two months to afford the lowest tier [emoji507]. If enough did that, it would add up.
[Android Apps and Games] mariosaraylian:
ktmom:

I installed the new Magisk 20.1 and the new Adaway v4.3.0. I also tried your suggestions of uninstalling Systemless Hosts and Re-installing etc. I DID have the same problem. But, after a reboot again, for "****s and giggles" I changed the Target Hosts path to /data/hosts, (instead of /system/etc/hosts) in AdAway and re-installed the Hosts and it WORKED!

I even switched the Target back to /system/etc/hosts again for the hell of it, and it WORKED again.

No idea what I did or how it got fixed........but thanks for your help either way!

Hopefully it will stick!
[Android Apps and Games] Johnn78:
Does 4.3.0 support http protocol ? Also, when you update the host file, then does it warn you if the ALL HOST source url have created the final host file ?
[Android Apps and Games] sirxdroid:
Trying to install 4.3.0 via Solid Explorer on Android 10 (Pixel 2 XL) and it errors out with "there was a problem parsing the package". The file download is OK, I checked the md5. Is there a problem with the 4.3.0 packaging or Solid Explorer?
[Android Apps and Games] xsonymonx:
I think is a Problem with Solid Explorer.

Go to PlayStore and update Solid Explorer ;)
[Android Apps and Games] stiggerby:
I switched to amaze file explorer, seems to be just as good
[Android Apps and Games] P1f:
In my case is not working with Amaze neither.

And also the older 4.2.9 can no longer be installed.

So i recon is an Android 10 issue not a file explorer? I have OnePlus 6 running Android 10 Open Beta 1
[Android Apps and Games] cultofluna:
Also on OB android 10..( OP6T)

No problems with installing...
[Android Apps and Games] guest4711:
Perhaps you have an old installation where AdAway is signed using another key (e.g. the key of the apk from f-droid is different from the one used on the version posted here). Deinstall AdAway, then install the new one.
[Android Apps and Games] revt3949:
Hi, how to the current adaway relate to Magisk & passing SafetyNet? Looking on adaway.org etc. I find no mentions on this subject. Is enabling systemless hosts in Magisk still sufficient to pass SafetyNet?
[Android Apps and Games] knpk13:
Yes, assuming nothing else is tripping safetynet.
[Android Apps and Games] martyfender:
Such as xposed, for example, or now edxposed, but apparently there is a workaround for edxposed that Google broke yesterday
[Android Apps and Games] mnsor1234:
Something wrong I try to add list but I can't any list any solution please?
[Android Apps and Games] Master Cylinder:
I had the same problem on my Pixel with ES File Explorer and Amaze, but when using the native "Files" app it installed fine.
[Android Apps and Games] P1f:
Thank you, I confirm also the OnePlus Files app is working to install 4.3.0 correctly.

No idea what happened with the other file managers on Android 10 though...
[Android Apps and Games] Master Cylinder:
After installation, downloading hosts failed, so I just touched the "Systemless Hosts" feature in Magisk settings, rebooted and it's blocking ads at the moment.
[Android Apps and Games] robertbarber:
If you were using the apk viewer option in solid explorer to install Adaway when you got the error message there is an update to those who are using the beta which may have fixed that if that was what was causing your problem with installing it. Here is a link to the latest beta which added that fix if you would like to check it out

https://www.apkmirror.com/apk/neatbytes/solid-explorer-beta/solid-explorer-beta-2-7-8-release/
[Android Apps and Games] paulr24:
Sorry for the super late reply! I checked out the hosts file like you said and it is filled with quite a bit of text. Here are the hosts sources listed in settings:

https://adaway.org/hosts.txt

https://hosts-file.net/ad_servers.txt

https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&showintro=1&mimetype=plaintext

I also tried uninstalling and then reinstalling Adaway 4.3 before checking the above settings. No dice :(
[Android Apps and Games] zgfg:
After updating hosts file, you must restart the phone - without Android does not re-read hosts file.

You can try one by one your hosts sources to see if it finds them or they don't exist anymore (I just successfully opened your three in browser, so they exist) - that's why I listed in my previous response hosts sources that I use and that did work at that time

If you see ads from some URL, you can check search in the hosts file if that URL is listed there (usually, hosts sources should list it, specially if you combine several of them, but just in case)- if not, you can add it with your own Black list

Then, it is also question where do you see ads. AdAway does not help for YouTube. Some apps/games may have their own mechanism to push ads, they don't need to resolve DNS for that, and AdAway/hosts file cannot protect you from their ads

For example, in XDA app, it is highly visible if hosts file protection works or not

E.g., if you see ads in Chrome (and Cromium based browsers), you need the following:

https://xdaforums.com/mate-9/help/modding-removing-bloatware-blocking-ads-t3971297/post80526823

But if you are on Android 10 (even 9 on some platforms), you must enable Systemless hosts option from Magisk and then update hosts file in AdAway because System partition is read only and AdAway cannot write to the hosts file

Finally, you can choose a path to the hosts file in AdAway, maybe default is not the right for your ROM, then experiment with other paths (change, update hosts, restart phone)
[Android Apps and Games] geokilla:
No need to restart. Just clear all the apps out of the Recents App list and you'll be good to go.
[Android Apps and Games] ktmom:
This is wrong.

A few older devices could get away without a reboot, but the only way to force the hosts file update to apply is to reboot.

On the chance that you are talking about clearing the recent apps, that will not have an effect of clearing the Java DNS cache which is why a reboot is required.
[Android Apps and Games] geokilla:
I meant clearing the Recents App list. My bad. But yeah, I never restart the phone to get the host files to apply. I just clear them out and I'm good to go. Ads are blocked or unblocked as I need.
[Android Apps and Games] knpk13:
[MENTION=8193562]revt3949[/MENTION]

The last issue I had with safetynet a few weeks ago (pretty rare for me), was Google updating it to require the ROM security patch level/date to match the date the fingerprint of the ROM. I'm not sure if they reverted that though. I used a magisk script to change build.prop to fix that. You can use Didgeridoohan's magisk module to do that too. That might be one reason safetynet would fail (if it's always been working) that I can think of.

Here are the details of you're interested.

https://xdaforums.com/oneplus-3/one...velopment/rom-nlos-16-0-t3879405/post78433987