FORUMS
Remove All Ads from XDA

[APP][Root][OFFICIAL] AdAway v4.3.2 :: [2019-12-29]

603 posts
Thanks Meter: 5,257
 
Post Reply Email Thread
30th October 2019, 02:47 AM |#14051  
Senior Member
Thanks Meter: 821
 
More
@mariosaraylian

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.


@ktmom

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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20191029-192819.png
Views:	804
Size:	92.9 KB
ID:	4860413   Click image for larger version

Name:	Screenshot_20191029-192849.png
Views:	804
Size:	62.0 KB
ID:	4860415   Click image for larger version

Name:	Screenshot_20191029-193007.png
Views:	802
Size:	184.5 KB
ID:	4860417  
30th October 2019, 03:58 AM |#14052  
ktmom's Avatar
Forum Moderator
Flag Deep Space Station K7
Thanks Meter: 2,804
 
More
Quote:
Originally Posted by ipdev

...

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.)

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.
The Following User Says Thank You to ktmom For This Useful Post: [ View ] Gift ktmom Ad-Free
30th October 2019, 05:37 AM |#14053  
Senior Member
Thanks Meter: 821
 
More
Quote:
Originally Posted by 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.

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.
The Following User Says Thank You to ipdev For This Useful Post: [ View ] Gift ipdev Ad-Free
30th October 2019, 09:43 AM |#14054  
mariosaraylian's Avatar
Senior Member
Flag Los Angeles
Thanks Meter: 103
 
More
Quote:
Originally Posted by ktmom

That enhanced log didn't help . I was kinda hoping for the path that was being used.

I scanned back through the thread/your posts, and I don't see what version of Magisk your running.

Somewhere around Magisk 19.3, things changed for systemless hosts. I say that based on date stamps on the files on my device.

I have always had the systemless hosts setting enabled. On my device, I have (had) a /sbin/.magisk/modules/hosts/system/etc/ path with a hosts file that is older than my last hosts update. Disabling the systemless hosts, then rebooting had no affect on my ability to update the hosts file with Adaway.

The updated file now lives in /sbin/.magisk/mirror/system/etc. So I completely removed the systemless hosts module. As expected, there was no negative effect on updating hosts, and the file in the mirror path definitely is updated. I guess I missed a change log entry for Magisk.

So, if you are on at least Magisk 19.3 or newer, I think the systemless hosts module is a red herring.

This also is consistent with recent posts confirming that Adaway is working without systemless hosts enabled on A10. I'm sure there's changes were made due to the inability to mount / on A10. The entire partition is mirrored.

What OS and Magisk version are you on?

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 ----------

Quote:
Originally Posted by ipdev

@mariosaraylian

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.


@ktmom

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.

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...????
30th October 2019, 10:18 AM |#14055  
Junior Member
Thanks Meter: 1
 
More
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!
The Following User Says Thank You to Hifexar For This Useful Post: [ View ] Gift Hifexar Ad-Free
30th October 2019, 02:29 PM |#14056  
ktmom's Avatar
Forum Moderator
Flag Deep Space Station K7
Thanks Meter: 2,804
 
More
Quote:
Originally Posted by mariosaraylian

...
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...????

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 ----------

Quote:
Originally Posted by Hifexar

...
Please add the log records are blocked, it is very necessary!

This exists. It's called DNS logging.
30th October 2019, 02:47 PM |#14057  
Junior Member
Thanks Meter: 1
 
More
.
Quote:
Originally Posted by ktmom

This exists. It's called DNS logging.

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?
30th October 2019, 04:01 PM |#14058  
ktmom's Avatar
Forum Moderator
Flag Deep Space Station K7
Thanks Meter: 2,804
 
More
Quote:
Originally Posted by 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?

That would be called white listing and yes, this has worked for a long time. Did you carefully read that page?
30th October 2019, 04:19 PM |#14059  
Junior Member
Thanks Meter: 1
 
More
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 [s], 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:
[[email protected] 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 ----------

Quote:
Originally Posted by ktmom

That would be called white listing and yes, this has worked for a long time. Did you carefully read that page?

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.
31st October 2019, 10:10 AM |#14060  
Junior Member
Thanks Meter: 1
 
More
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.
31st October 2019, 03:43 PM |#14061  
Senior Member
Flag Bukit Jalil
Thanks Meter: 16
 
More
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.
Post Reply Subscribe to Thread

Tags
ad block, adaway, adblock, adblocker, source

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes