yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] zgfg:
I use Chrome and I have no ads.

I don't use other browsers like Opera, etc

I did have problems with Chrome but on an older version of Xiaomi.eu than what I'm using now.

I did find solution, it had nothing to do with AdAway (AdAway was properly filling hosts file - that's what AdAway only does and what is only responsible to do in the root mode), it was a problem with the ROM + Chrome, and only on WiFi connections whose DHCP pushed DNS server 1.1.1.1/1.1.0.0 or 8.8.8.8/8.8.0.0 (I had to ignore DHCP and put the other DNS server for that WiFi connection in the Settings/WiFi on the phone)

Few other users had similar problems on Mobile Connections and posted about, and their solution

Eg, I tested at that time by playing with disabled Hosts sources, I only set one or two sites like CNN.com manually to to Black list in AdAway, then I inspected was the site really added to hosts file, I tested then to open the site in Chrome, and so on.

In Chrome, there is a local "URL" where you could see which DNS server it uses and how it resolves the given URL (like that CNN.com), hence you can catch when Chrome ignores the hosts file and opens the site that was actually properly blocked in hosts fike), etc

I did post a lot about like 3/4 months ago when I was debugging for myself. If you dare you can search for the posts, study, and similarly investigate yourself. Since I solved for myself at that time and since with the new ROM I don't have the problem (I didn't need the workaround I used with the older ROM), I don't remember further details...
[Android Apps and Games] SchWeinSAuG:
thanks for that insight. gonna try around later .

cheers
[Android Apps and Games] alaminus:
How can I revert back to the default host file settings after uninstalling AdAway?

My Device Info : LineageOS 20 / Systemless Hosts Magisk Module / Android 13
[Android Apps and Games] zgfg:
Disable or uninstall Systemless Hosts module in Magisk app, Modules

And reboot tten
[Android Apps and Games] alaminus:
Does m't work. Host File still there.
[Android Apps and Games] Nergal di Cuthah:
Reinstall adaway, disable it then uninstall again
[Android Apps and Games] zgfg:
If the System is Read-Only then AdAway cannot write over the /system/etc/hosts and it works fully systemlessly - hence when module is disabled, there is no more mounting over the original hosts file

However, I really don't know about peculiarities with LOS. Or you have another module that also affects hosts file

Take the root explorer (like MiXPlorer and check /system/etc/hosts

What do you see in that file? Do you know how it looked original that you could compare to know if now is still different
[Android Apps and Games] alaminus:
View attachment 5975975
[Android Apps and Games] DiamondJohn:
@alaminus I dont think you have answered @zgfg question, although it was almost stated as an assumption. Is you system partition read-only?

If not, then, if you once ran Adaway in root-mode before switching to sytemless, then your host file in system has been changed, and switching systemless off will only return you to already last modified (by Adaway) host file
[Android Apps and Games] alaminus:
System is Read-Only - thanks for help
[Android Apps and Games] ipdev:
Not entirely true for some reason. :unsure:

A little over a year ago, I was asked to test AdAway (root mode) on official linage build(s) without the "systemless hosts" module.

Part of my side of the conversation.

With a custom rom (lineage) there will be free space in system.

This is by design so users can install addons like GApps.

Depending on how much free space you have left in system, is how large your hosts file can be.

The hosts file will be truncated when no more space is left.

Spoiler content hidden.

With that said. 😉

---

A far as I know..

The only way to restore the original hosts file would require a clean flash.

Lineage uses an addon.d script to backup and restore the hosts file when updating, so a dirty flash would only backup and restore the hosts file you currently have.​

You can use AdAway to generate a basic hosts file that would be the same, save for the header info.

# This hosts file has been generated by AdAway on: 2023-08-13 10:10:48
# Please do not modify it directly, it will be overwritten when AdAway is applied again.
# This file is generated from the following sources:

127.0.0.1 localhost
::1 localhost

To do this..

1. Disable the systemless hosts module and reboot.

2. Open AdAway (root mode) and deselect all the hosts sources.

3. Apply.

Then you can enable the systemless hosts module and reboot.

From there, the new hosts file should be systemless as long as you have the module active.

Hope it Hope it helps more than confuse. 🙃

Cheers. :cowboy:
[Android Apps and Games] zgfg:
Thanks for the analysis.

Btw, I answered him then "I really don't know about peculiarities with LOS"

However, if System is not read-only on LOS but only limited in free space, @alaminus could also (if just to restore original hosts file):

- uninstall AdAway

- uninstall Systemless hosts (Magisk app, Modules screen)

- reboot

- manually edit /system/etc/hosts file to contain only:

127.0.0.1 localhost
::1 localhost

Or (if not having enough free space at the moment when saving) to delete the hosts file and to create new one with localhost (and local domain) only

Btw, it can be checked in /vendor/etc/fstab.* file, if /system is "ro" or "rw" (read-only or read-write) and how many free space was left
[Android Apps and Games] ipdev:
One would think but... 🙃

You can not modify system directly because it is mounted read-only.

For some reason, AdAway has direct write access to the hosts file on lineage.

Not sure if it a leftover from older Android (when system was mounted RW).

¯\_(ツ)_/¯

Current Google Pixel(s) builds still set 0644 permission for the hosts file.

read-write for owner, read only for group and public.​

Pixel 7a - [13.0.0 (TQ3A.230805.001, Aug 2023)]

lynx:/ $ ls -laZ /system/etc/hosts
-rw-r--r-- 1 root root u:object_r:system_file:s0 56 2008-12-31 18:00 /system/etc/hosts
lynx:/ $

AdAway gives an error and can not write to the hosts file since there is no free space in system.

The second atempt give an error and tells you to install the systemless hosts module.​

---

Back to Lineage. 😉

Pixel 3a XL - Lineage 19.1 (12L) [lineage-19.1-20230812-nightly-bonito]

[ip@lost ip]$ adb shell
bonito:/ $ ls -laZ /system/etc/hosts
-rw-r--r-- 1 root root u:object_r:system_file:s0 248 2023-08-13 10:10 /system/etc/hosts
bonito:/ $ cat /system/etc/hosts
# This hosts file has been generated by AdAway on: 2023-08-13 10:10:48
# Please do not modify it directly, it will be overwritten when AdAway is applied again.
# This file is generated from the following sources:

127.0.0.1 localhost
::1 localhost
bonito:/ $ rm /system/etc/hosts
rm ro /system/etc/hosts (y/N):y
rm: /system/etc/hosts: Read-only file system
1|bonito:/ $ ls -laZ /system/etc/hosts
-rw-r--r-- 1 root root u:object_r:system_file:s0 248 2023-08-13 10:10 /system/etc/hosts
bonito:/ $ su
bonito:/ # whoami
root
bonito:/ # rm /system/etc/hosts
rm ro /system/etc/hosts (y/N):y
rm: /system/etc/hosts: Read-only file system
1|bonito:/ # echo "WTF">/system/etc/hosts
/system/bin/sh: can't create /system/etc/hosts: Read-only file system
1|bonito:/ # exit
1|bonito:/ $ exit

With root adb enabled under Lineage dev options.

[ip@lost ip]$ adb root
restarting adbd as root
[ip@lost ip]$ adb shell
bonito:/ # rm /system/etc/hosts
rm ro /system/etc/hosts (y/N):y
rm: /system/etc/hosts: Read-only file system
1|bonito:/ # echo "WTF">/system/etc/hosts
/system/bin/sh: can't create /system/etc/hosts: Read-only file system
1|bonito:/ # exit
[ip@lost ip]$

Cheers. :cowboy:

PS.

[ip@lost ip]$ adb shell
bonito:/ $ grep 'system' /vendor/etc/fstab.sdm670
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
system /system ext4 ro,barrier=1 wait,slotselect,avb=vbmeta,logical,first_stage_mount
system_ext /system_ext ext4 ro,barrier=1 wait,slotselect,avb,logical,first_stage_mount
bonito:/ $
[Android Apps and Games] zgfg:
That's strange. "ro" in fstab should make chmod 6xx (writable for system group) pointless

Or, could it be that the AdAway's hosts file was installed by LOS recovery?

I have my older phone (Xiaomi, originally released with A9 and upgraded to A11)

/system is "ro" in fstab and with no root app I could write to the System

However, I mounted /system as read-write in TWRP and then, by using TWRP Advanced, File Manager, hard debloated (deleted their folders) several System apps. It made me free room and I was able then to hard-overwrite /system/etc/hosts file again from TWRP - by manually overwriting with current at that time AdAway's hosts file

Although not up-to-date with the always updated AdAway's /data/adb/modules/hosts/system/etc/hosts file, it still helps me to get rid of ads when I boot with stock boot.img and/or when I disable Magisk, boot it in Core only mode or with Systenless hosts module disabled

However, on my other, newer hone, I can only flash over the whole Super, I cannot delete or replace System files or folders from TWRP - by no means, TWRP could not really mount /system as writable
[Android Apps and Games] DiamondJohn:
I *think* a true Read-Only system partition is defined by the hardware. As far as I am aware, there is no ROM or change to ROM source (eg FSTAB), that could make my Pixel 4A 4G allow or enable a read-write system partition. I could be wrong, but I think its in the hardware.

However, it is device specific, and on some other devices & ROMs, it will be imitated through software only. Even my older devices would boot with a RO system partition and would require a root enabled change to RW; and of course, root to then do the actual writes.
[Android Apps and Games] zgfg:
All partitions together (Boot, System, Data, etc), would be 'hardware'. If read-only by hardware, it would be like compact-disks, what they shipped, not even OTA would be able to overwrite, there would be no factory reset, nothing

It's not 'hardware'. That whole storage is divided to partitions by file-systems. They can be formatted as ext4 (system partitions), f2fs (usually data although on some devices it could be also f2fs), vfat - together with all attributes (ro or rw, encryption params, sizes, etc) it's described in the file-system table /vendor/etc/fstab.*

Btw, you can find a thread on XDA, I think it's dead now but they made it working (general concept, there are practical complications for various phones and ROMs):

- copy the firmware to PC

- reformat storage without read-only attributes (system partitions must be also expanded, otherwise there is no use of making them writable if they are full - data partition pays the price and must be shrunk)

- flash everything back

And you have the same ROM back but with fully writable Systems partitions
[Android Apps and Games] DiamondJohn:
I think you misunderstood what I said. Its the limitation is built into the hardware level, which could mean the software internally on the hardware. I have yet to see any ROMs on these newer devices include a commit to switch over their current/actual/defrault system partition to Read-Write.,

As for the thread (I think I saw it), that is NOT the same as making the original system partition RW. I used to use a similar approach back on my first Android device, which had a tiiiiny internal memory (inc system). On that device the system partition was mounted/moved onto an external RW sdcard; with a boot scr[pt. That old thread (I think I saw) is partially the reason I think its beyond the ROM (eg FSTAB) to switch to a RW system partition on the running OS. And in that case, the original system partition remains as RO. PS On my old device, In later ROM builds, the moving of the partitions to use the SDCard, was baked directly into ROMs and you had to have an EXT4 partition on an external SDCard.

Do not forget the ROM does not speak directly to the hardware, it passes through/integrates with BLOBs supplied by the manufacturers, which are closed source. Those closed source BLOBs can partition hardware RW mem, to whatever they desire/wish.

If it was that simple, there would be a commit kanged around between ROMs changing it. Or even a Magisk script changing the FSTAB. So many people with custom ROMs would love to go back to the old days to modify the system partition. I have not seen such a commit.
[Android Apps and Games] gallegonovato:
Good afternoon:

I am hearing about a possible bug in Adaway, in its latest version. And the automatic turning.

It turns out that I have an acquaintance who says that when he turns the mobile, and the screen turns by itself. The total of blocked sites disappear, if Adaway is creating or copying a host. This process stops.

He says he has Lineageos 19.1 on a Google Pixel (Adaway with Magisk and systemless) . But he says it also happens to him on a Samsung with Android (Adaway without root).

Let's see if I can get more details on what is happening to him; as we didn't have much time to talk about this bug happening to him.

But I thought it was timely to comment on it in case the same thing happens to anyone.

Best regards
[Android Apps and Games] TigerKing:
How to whitelist androidacy site?

I'm unable to download from Androidacy Module Manager (AMM)

for downloading I have to restore original Host file.
[Android Apps and Games] zgfg:
In the AMM Settings, disable their Repo, enable Alternate Magisk Repo and reboot

They pretty much stalled all modules from:

Magisk Modules Alternative Repository

An alternative to Magisk-Modules-Repo with fewer restrictions. Now larger than the original! - Magisk Modules Alternative Repository

github.com
[Android Apps and Games] DiamondJohn:
Has anyone got a youtube APP video allow list?
[Android Apps and Games] DiamondJohn:
Oooops... My bad :oops:, I had my allow list, but I didn't include it in my list of allow sources.:sleep:
[Android Apps and Games] gallegonovato:
Good afternoon:

Do you know if Adaway works well with the latest version, I think it is beta still. of Magisk?

By the way @DiamondJohn

Do you mean the connections to allow?

Try with:

i.ytimg.com

i1.ytimg.com

s.youtube.com

s.ytimg.com

s2.youtube.com

youtu.be

youtube-nocookie.com

googlevideo.com

In principle it should go. Otherwise there are many other connections.

But then there are other open source applications for Android. But I don't know if I can name them in the Adaway thread. And if you use Android they go very well.

Best regards
[Android Apps and Games] Nergal di Cuthah:
Works with latest (today) canary which is feature identical to today's beta
[Android Apps and Games] zgfg:
And Canary

v26.2

v26201
[Android Apps and Games] DiamondJohn:
Thanks, but as you can see above, I already found my list. And its a little longer/extensive; I extended it when I *though* it was being used, but was missing some allow hosts. The new one may let some YT ads come through on 3rd party pages. If I see these I will adjust, but for now, it looks good, and the app works.

A thing to remember, I have a LOT of hosts sources resulting in a HUIGH block list, so some sources could be blocking YT hosts not covered by smaller list . I end up with over 3.7M blocked hosts, so extensive whitelisting is required. ie this list isn't for everyone's needs, but I am not too sure how it would hurt, as I have only used it for a few minutes.

Spoiler content hidden.
[Android Apps and Games] TigerKing:
Found the culprit.

Whitelist URL

pagead2.googlesyndication.com
[Android Apps and Games] gallegonovato:
Good morning @DiamondJohn

Glad you found your listings.

The main ones, among others. They are the ones I told you about. But youtube has multiple of links of the style:

Spoiler content hidden.

Attached. But in spurts of them and it changes. If not, maybe https://raw.githubusercontent.com/nickspaargaren/no-google/master/categories/youtube.txt can help you too.

But the best thing is that it works well for you

Pd: @DiamondJohn . One question, if you don't mind. Could you put the link to your host lists? It might be helpful :)

A hug
[Android Apps and Games] ArtuCer:
Android Police site https://www.androidpolice.com started to show annoying popup about detected blocker.

Is the any workaround to stop showing the popup?
[Android Apps and Games] DiamondJohn:
I just went on my desktop browser, got blocked, but then clicked on "I have disabled my adblocker" and then it simply went through. So the workaround on the desktop is to fib :cautious:
[Android Apps and Games] ArtuCer:
But on Android chrome it disapear only temporary and after refreshing page it popup again
[Android Apps and Games] zgfg:
Click to the link and then checkmark Desktop Site

It worked for me in Chrome(Android) but it's inconvenient to read
[Android Apps and Games] krakout:
So there's no proper solution for Admiral? If I understand it correctly allowing you to proceed without disabling your anti-ad solution is an option on the platform (other sites don't have it) so it's probably a matter of time till it doesn't work on your visit...
[Android Apps and Games] sammu.89:
Hi there

I'm uncertain if this is the appropriate place for my query or if it has already been discussed elsewhere, but my search yielded no results.

Several weeks ago, my AdAway for Android ceased to function, or at least it appears that way. I am encountering ads and pop-ups everywhere in Chrome. I am utilizing version 6.1.1 with the primary ad hosts blocked (see image).

My Magisk version is 26.1, and my phone is rooted without any issues.

Do you have any insights into what might be causing this problem?
[Android Apps and Games] krakout:
Systemless hosts?
[Android Apps and Games] DiamondJohn:
English is my first language, but if my tourist Spanish hasn't failed me, the first thing I would dop is update/refresh/rebuild your host file from new downloads of your host source files. They look pretty old and ad host sources are rotated/changed constantly.

Secondary, I would search the thread for "Chrome"
[Android Apps and Games] m0han:
My new device is not rooted, hence AdAway is in VPN-mode. On this as well as my earlier device, which was rooted using the latest Magisk Delta, there are only two hosts enabled. TBH, even the first one is not really necessary. Needless to say I am not getting any bothersome ads.

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

https://schakal.ru/hosts/hosts.txt
[Android Apps and Games] sammu89:
Yep, Systemless hosts activated in magisk.

My sources for host files include the official Adaway hosts, as well as frequently updated hosts (updated every 3 days, 1 week, etc). The oldest source I use is Adaway's official hosts.

I regularly rebuild my host file as the initial step in my debugging process. However, despite doing so, the issue continues =/
[Android Apps and Games] DiamondJohn:
Have you tested pinging the block hosts? Are they coming through in apps as well?

And a few years ago I had a much smaller host file, and by the end of nearly every single day, ads broke through. Now I use a much larger host file from many sources plus a private DNS, and I cant remember the last Time I saw an ad, and I only build once a week. But, my host file is huge.
[Android Apps and Games] krakout:
Anyone has figured out a list blocking the Admiral anti anti ad pop-ups?
[Android Apps and Games] DiamondJohn:
I know nothing about these, but the following implies you can not achieve it with host / firewall blocks. Sounds similar to youtube ads not being blocked by hosts

https://www.reddit.com/r/firewalla/comments/1198z2d
[Android Apps and Games] krakout:
Yeah from the thread it looks like it's a matter of cosmetic filters. The reason I asked is because there is actually a hosts list somewhere that is supposed to kill it, but it hasn't worked for me...
[Android Apps and Games] DiamondJohn:
There are hundreds of "YouTube ad block host files". But they dont work, just as the one you found does not work for For Admiral.

And to repeat, I know nothing about this admiral thing, just the link I found above, and now your personal experience. Just out of interest, have you got a link to a URL I could test my6 blocking against? knowing it will not work.
[Android Apps and Games] krakout:
Sure, it's over at https://v.firebog.net/hosts/Admiral.txt . I found it on an issue on AdAway's GitHub...
[Android Apps and Games] DiamondJohn:
Sorry, not the list, but a site that displays the ad. Probably best if you delete it after I get it. No need to give them a free link.

PS: This list is not in the correct format for AdAway. So it would not work even if host blocking could block Admiral ads
[Android Apps and Games] krakout:
Yes I know, the list is just a list of hosts, I converted it offline and added it.

As for a site... XDA does it on the front page😂 (not forum). Android Police is another.
[Android Apps and Games] DiamondJohn:
I just tested both these websites, and after clicking "I Have Disabled My Ad Blocker" the site renders and I dont see any obvious ads. What should I expect?

I use DuckDuckGo as my browser,

dont use adaway to build my host

Already have your list in my host sources

Have over 100 host sources generating over 3.8M host blocks
[Android Apps and Games] krakout:
Ahhh no, the problem is not the ads, the problem is the popup itself! 😊
[Android Apps and Games] dafank:
One of my bankings apps is not working when i enable adaway, I think i know all the domains it's using, so my question is, how can I delete those entries from the deny list?

I tried to add them to the while list, but it didnt work, the application keeps failing until I disable adaway.
[Android Apps and Games] DiamondJohn:
are you talking of the pop-up asking to disengage your ad blocker?
[Android Apps and Games] krakout:
Yes, that's the Admiral pop-up.
[Android Apps and Games] gallegonovato:
Good afternoon @PerfectSlayer

I wanted to comment with you, some inssue that you opened on Adaway's github, and which I think you are right.

For example: https://github.com/AdAway/AdAway/issues/3998 . Here I ratify that you can not read all the text. Nor in Spanish.

And then https://github.com/AdAway/AdAway/issues/3997 . You could choose in which network to do the updates, the time in which to do it (hours, minutes, etc..).

And then a further suggestion if I may. After making the update of the host list. You should see a banner, popup window or warning. Remembering that it is better to reboot the phone. So that the system settles the changes made in the update. Or as it was in older versions of Adaway.

Best regards and thanks for your time
[Android Apps and Games] juanrra242:
Hi !! I need a tutorial of how yo add web adress to whitelist. I searchdd here in the wiki and It seems that is for an old version,i cant follow It in the new one. I know how to log ,but dont know and dont understand the símbolos and colors that shows at the left of the adress ,so cant figure out how yo edit the adress to put * .

Thanks in advance
[Android Apps and Games] gallegonovato:
Good afternoon @juanrra242

About how to add a connection to the whitelist. You can take a look: https://xdaforums.com/t/discussion-magisk-the-age-of-zygisk.4393877/post-88438303

But if I'm not wrong, if I'm wrong let some colleague correct me. Adaway does not support wildcards like * .

Best regards
[Android Apps and Games] zgfg:
I'm sure that eg I have answered similarly, hence it must be in the thread

Anyway, follow the screenshots and reboot at the end (if using root and Systemless hosts)
[Android Apps and Games] Heat84:
I'm having an issue that might be outside the scope of this thread, but it involves the AdAway generated hosts file. I thought it would be a good idea to use it for my PC. The only problem is the entries in the hosts file have to be loaded into Windows' DNS cache, which takes a long time. Half an hour I think, or maybe 15 minutes. Why don't I have this problem with my phone? I also have Linux installed on my PC and it doesn't have this problem either. Is there anything that could be done to fix the problem in Windows? Or is just a case of Linux and bootleg Linux (Android) doing things better than Windows and there's nothing that can be done about It?