yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] DiamondJohn:
ooooo... I just hit something that may get Android to read and thereby use the resolve.conf file.

1|sunfish:/ # dnsmasq -d
dnsmasq: started, version 2.51 cachesize 150
dnsmasq: compile time options: IPv6 GNU-getopt no-I18N DHCP no-scripts
dnsmasq: failed to access /etc/resolv.conf: No such file or directory

Its getting late now, so it is something to test later for me (ie remount the file, run the dnsmasq app and check again), unless someone else has a chance sooner.

Spoiler content hidden.
[Android Apps and Games] DiamondJohn:
Yeah, that was simply a typo as I manually keyed it into the thread post. My Bad, my typo, I used the file names I downloaded from your posts.

As for my host file uncommented section, I build a large host file using a script I created, and must of accidently deleted the comment character on my last fix. Should be a 1 char fix in the script.

If I am understanding you correctly, the long and short of what you are saying is that it didn't make a difference?

I did see on the web pages I came across the above, that the dnsmsq logs the DNS requests, which I also hope to check to see if it is running and maybe understand why its skipping the host file.

The other thing I wish to check, is when I had a RW system partition, I put the DNS servers in the build.prop and not the system.prop. Not certain about the interplay between these two files.
[Android Apps and Games] zgfg:
Yeah, it didn't help to me

Please read about system.prop file on TJW Magisk GitHub site, Magisk Doc, Dev guide, Modules

system.prop is just an easier way to do:

resetprop -n ...

for the listed props

Go to /data/adb/modules and you will find system.prop in many modules folders - open the system.prop files and inspect which props they change.

Magisk collects and mounts all of them together

Also, open Terminal emulator (I had screenshot in my previous posts), run

su

getprop | grep .dns1

getprop | grep .dns2

to see if the props from system.prop were applied or not

Run once without system.prop and next time with system.prop (always reboot, Magisk mounts only on reboot)
[Android Apps and Games] Cipcino81:
Bump
[Android Apps and Games] zgfg:
@DiamondJohn please be aware that I had to edit my previous post #17364

In short, Cloudflare DNS servers 1.1.1.1 and 1.0.0.1 are not good for my Chrome just like the Google DNS servers 8.8.8.8 or 8.8.4.4 (for each of them, my local hosts file generated by AdAway is ignored, hence the advertising sites are no more blocked and Chrome pops-out the ads elsewhere)

Instead, I have to use any of the following (for each of them the local hosts file has a correct precedence, making it able to properly block the ads)

Quad9 DNS:

9.9.9.9

149.112.112.112

DNSWatch:

84.200.69.80

84.200.70.40

OpenDNS:

208.67.222.123

208.67.220.123

OpenNIC:

185.121.177.177

169.239.202.202
[Android Apps and Games] DiamondJohn:
Wait a sec, am I understanding you correctly in that by switching the IP of DNS to the ones above, you now get blocking of ads (that didnt work before)? although for me its not a chrome specific issue, its in apps (and browser) that ads stop being blocked when on mobile data, and 100% block on WiFi.
[Android Apps and Games] hteles:
About not being blocked on mobile data ?

Check your APN for a proxy setting. Of enabled will bypass local DNS.
[Android Apps and Games] DiamondJohn:
I have not explicitly applied proxy settings. I *think* what is happening, is the mobile provider (vodafone AUS) is reconfiguring the data connection, to use its proxy setting, which also skips the host file. But its a guess. I also tried using a Private DNS setting to an advertising blocking DNS, and that appears to also be ignored on Mobile data.
[Android Apps and Games] hteles:
Try to edit the APN and remove the proxy entry. Save and retest.
[Android Apps and Games] me &:
Update doesn't work on Alcatel 1b 2022. What to do?
[Android Apps and Games] Nergal di Cuthah:
Root or vpn? What root and version? If magisk do you have systemless hosts module? Nobody knows all devices so Android version? What host sources are you using? What do you mean won't update, show us what you've done and are doing.

Basically if anyone's going to help you need to be more forthcoming.
[Android Apps and Games] DiamondJohn:
THANK YOU!!! This fixed it!!!!

When I was testing a couple of days ago in a number of apps that had Ad's, one started a full screen video Ad WITH sound! that was unbelievable intrusive, EVERY time it started. I didnt notice it before, as I normally use that app only on WiFi, where Ad blocking worked. But now I cant remember which app that was.

I cleared the proxy and the port to be sure. I also previously set the DNS to the ones @zgfg (oops.. had the wrong user) suggested, although it didnt fix it, I may also fix DNS2, or remove some changes, as i now have both a boot script & the system.prop changes in a Magisk module. I have a lot of boot scripts and its my preferred system for re-instating after a clean flash, as I do a bulk group of boot scripts rather than magisk modules. There are other OT reasons I prefer boot scripts.

It *may* of also increased the speed of my mobile data. I did a quick check to see that it wasn't degraded, and I think I got higher Up & down than I had regularly previously; but it may of just been a one-off.

I tested turning wifi on & off, and it stuck when I iterated (y) However, a reboot reconfigures it back in, so I will search the web to check how to clear it via boot scripts; you guys have done more than enough. Thanks.
[Android Apps and Games] ipdev:
I think you meant zgfg for the DNS servers. 😉

I switched to using VPN mode (non-root) when ads started showing using hosts (root mode) while using Mobile Data.

I have been following the discussion and interested in what you find out.

I will gladly switch AdAway back to root mode. 😉

Cheers :cowboy:

PS.

My APN settings.

View attachment 5894315 View attachment 5894313

PPS.

I see you already corrected your post. 😉 👍
[Android Apps and Games] DiamondJohn:
ARgggghhh!

last night when I rebooted, the proxy settings returned, with the ads. I found this link on how to force a global proxy, with the plan to include it in my boot scripts.

Setting a proxy using adb

I found these commands to add/remove proxy using ADB: #To Add Proxy adb shell settings put global http_proxy 192.168.1.252:8080 #To Remove Proxy adb shell settings put global http_proxy :0 Is pos...

stackoverflow.com

Basically using a set on the two below:

settings get global http_proxy;
settings get global http_proxy_port;

To test/check which values to set to step over the proxy setting, I rebooted in the hopes of reverting to the bad behavior. Unfortunately, clearing the proxy now sticks on every reboot!

And to make it even more diffuicult, I had captured a screenshot of the original values, but when I manually type them in, they clear when I exit and go back to check if they persisted. At first I was confused as after setting it back, the Ads did not return, now its clear the old settings did not stick and therefore the old settings allowing Ads wasn't running.
[Android Apps and Games] zgfg:
According to some YT demos, you could do it also a simpler way:

- SIM Cards settings, New APN

- create a new APN with the same settings but giving it a different name, without proxy and forcing to be your default APN

Provider may rewrite its own APN but not your copy under the different name
[Android Apps and Games] DiamondJohn:
I have historically built ROMs and before that I was a flash junkie, so re-setting up a device was a VERY common occurrence.

In a way, what I have done is even easier (ie delete two settings instead of noting and entering 10 specific setting values), the problem is that I would like to simply drop in my boot-scripts onto the device, and have it auto configure the device; no manual intervention/config. For eg, I use to have a script when I was rebuilding then clean re-flashing one HIGHLY customisable rom, that returned all my selected customisation adjustments (100 or so manual settings) so the phone returned back to its look-and feel just by running a shell script, instead of the palava of delving deep and returning and searching. I could also use it to transfer the selected settings between devices running the same ROM or to an extent, between two closely related ROMs, as they shared commits on settings/features.

The other thing that concerns me, if it is not accepting my little attempt to set it back on an existing APN, after creating a new one from scratch, for the same reason, it may not accept the setting for proxy, and I would be in the same situation. I haven't checked the logcat for clues, and I will leave this as a problem for "Future @DiamondJohn" to handle... My phone is up and running, I have had recent hell with a bootloop and no PC to fix, and a cracked screen, am not looking to upgrade too soon to A13, so am prepared to leave it be or fix it when/if it becomes an issue again. And it wasn't a total deal-breaker anyway, just annoying.

What I have reaslised, I have my old device, its A8-Oreo, but I think it had the same issue. It will be a hassle to swap the SIM card out-in-out-in between the devices, but doable, or maybe get a $2 starter SIM with minimal or no credit; rather than the hassle of swapping sims between phones. Actually, I have an old pay-as-you-go SIM somehwere? with no credit left that I may be able to use for testing this change; the setting only not the results. I also have a spare device (cheap ebay purchase, same as daily, Google 4A 4G) running A13 as a tester, that I could check with. I have options, but now that it works as expected, it has consumed enough time. I do like the size of this phone, I would of gone smaller if available with other features. Its a good device and stiull gets a lo9t of love on youtube, but the screens are prone to break, as my repair guy said first thing when I showed him; and its the SECOND screen I have broke.

PS: I checked my host building script that was missing the comment character on listing the source files, and it DID have the code that should of included the comment at the start of those lines.🤬 so thats at a higher priority to fix now, or in this case understand what the heck is going wrong; ie what am I doing wrong...
[Android Apps and Games] zgfg:
Put your script to:

/data/adb/modules/hosts

and name it service.sh or post-fs-data.sh and reboot

TJW recommends using service.sh but some modules need certain actions to execute earlier hence they use and/or post-fs-data.sh (find more about how/when Magisk executes these scripts in Developer Guide on the Magisk GitHub)

Go to the /data/adb/modules folders and find their scripts there

---

The way as above you will (mis)use again the folder from Systemless hosts module

You can also name your script whatever, like myScript.sh and put it to one or the other folder (again, Magisk execute the scripts it finds there at a different stage of booting):

/data/adb/service.d

or

/data/adb/post-fs-data.d

Or you can make your own module - minimalistic zip for your module is attached

Unzip, put your script (with the name as described above), re-zip (structure of the zip file must remain the same - inspect also zip files from the other modules), eg here:

zgfg - Overview

zgfg has 5 repositories available. Follow their code on GitHub.

github.com

'Flash' - ie, install from Magisk app (but don't become addicted again)😁

Edit the module.prop (author, description)

See where it goes when you install and where it moves upon reboot.

See what happens if you change id in the module prop, etc
[Android Apps and Games] DiamondJohn:
I dont think you could understand, as I have never documented it here on XDA. I have developed extensive boot scripting features that goes WELL beyond the features included for Magisk; and these features are required due to scheduling scripts in the correct order and dB concurrency (i have a LOT of dB scripts that run against the same dB). Trust me, its handled, and this code has been working solid since v1.0 around JB, with very little to no changes, and the core code is surprisingly short and simple and hence very reliable, for the extensive features it provides. The includes, supporting files and the scripts themselves on the other hand... I do have the small core/entry point script sitting in service.d . It started as an init.d as the original injection point in old CM based ROM's before Magisk, and could be thought of as init.d on Russian weightlifter steroids, and has two or three lines similar to the init scripts in ROMs that used to support init.d. It is actually safe to run as a post-fs-data (it handles timing in a simple way but adding complex control/features, and is obviously non blocking parallel processing, and hence it was safe as post-fs-data when I first installed Magisk and did not understand the difference between post-fs-data and service.d; it basically ran service.d "style", but earlier in the boot sequence. And I create multiple modules as it is. My App in my sig creates them on the fly. I have the basics under my belt, and so also have a "normal" Magisk zip module published here on XDA. Thats actually what I use to build my mega host file ;)

The timing / ordering / sequence control is one of the many reasons I prefer the boot script system I have over Magisk, when it is possible. A single script is easier to maintain and install than the multiple zip files each containing multiple files, i would need to maintain if each were a magisk module. And because of technicalities such as database concurrency (as one issue), the/a/or many Magisk module would be much more work for me than the simple scripting engine I have created; ie reuse. Trust me, magisk modules for my needs would be much more maintenance work. Thanks for your thoughts, but I have that covered, and its has been successfully covered for my needs, for many years.

And about mounting files as done by Magisk modules & folder structures, one thing I *think* I saw but have never needed, thus haven't looked into, was how Vanced used to mount VYT using scripting code, and not the common folder structure. Saving to look further into that one on a very rainy day.
[Android Apps and Games] ipdev:
You can blame me for the idea. 🙃

Their root install mimicked a Magisk module.

I did not have any thing to do with their implantation of my idea.

I was invited into the Alpha testing group though.

OT for this thread but..

Since Magisk's mount overlay did not extend to userdata.

I came up with the simple idea to just use the mount command to overlay in userdata.

It started around here.

Vanced - [xda thread] - Post #16,374

Vanced - [xda thread] - Post #16,545​

I had asked team Vanced for permission to release a module using Vanced.

Long story short..

Team Vanced incorporated it into their root install. 😉

You might also be interested..

Vanced - [xda thread] - Post #17,616

My current (revanced) version.

iYT - [github] - commit

iYTm - [github] - commit

---

Note:

zgfg uses the same idea of using the mount command to extend beyond Magisk's overlay.

For device (manufacture) specific partitions in his SystemlessDebloater module.

SystemlessDebloater - [github] - Link

Cheers. :cowboy:
[Android Apps and Games] zgfg:
Type the following 'address' to the Chrome address bar:

chrome://chrome-urls/

Then navigate to net-internals, DNS or use this 'address' directly:

chrome://net-internals/#dns

It shows how Chrome resolves the hostnames. Three screenshots attached: existing and not blocked, non-existing/wrong and blocked hostname

---

Btw, @PerfectSlayer, do you maybe call mount -o bind or something upon Hosts file was successfully updated or Changes applied, to immediately remount /data/adb/modules/hosts/system/etc/hosts to (/system)/etc/hosts
[Android Apps and Games] Relod8:
Hello, how can I get Adaway working on AndroidX86? I keep getting an error "Failed to install hosts file" , I have root enabled in developer settings and gave it su access.
[Android Apps and Games] zgfg:
Have you tried by enabling Systemless hosts in Magisk
[Android Apps and Games] xozaq:
Hi there, I am new to adaway (ditched blockada) and now am stuck with the problem that it seems that it blocks almost every internet connections (signal works but any other app and browsing the net is blocked). Any advice here? I feel kind of stupid not being able to get this going... Thanks in advance!
[Android Apps and Games] Nergal di Cuthah:
Are you using it in nonroot vpn form or root hosts form
[Android Apps and Games] xozaq:
Non root vpn.
[Android Apps and Games] Nergal di Cuthah:
Just default settings and sources?
[Android Apps and Games] Wakamatsu:
AdAway works fine for me on KK. I've never heard of the d4rken mod.
[Android Apps and Games] sirxdroid:
Doesn't work for me without the mod, on a Nexus 5 with SuperSU :(
[Android Apps and Games] ssenemosewa:
Sorry for not being concise.

It works for me on my rooted Nexus 7 2013, running KitKat 4.4.4 without the d4rken mod.

I also tried it on my rooted Nexus 7 2013, running KitKat 4.4.4 with the d4rken mod. That also works.
[Android Apps and Games] marksman789:
Is anyone getting a problem in which the scan for adware button doesn't work? When I press it the only message I get is "unfortunately, adware has stopped"
[Android Apps and Games] kingvortex:
It works for me. However, the feature doesn't seem that useful, as it only listed apps that I 100% know are not using airpush etc.
[Android Apps and Games] sancho_panzer:
Only proving you didn't read the OP. :cool:

Sent from my GT-I9505
[Android Apps and Games] Wakamatsu:
And...? I didn't find AdAway via this thread and I'm not having any issues with its use.
[Android Apps and Games] CEM90:
I manly use this app for Youtube. I hate the ads at the beginning of the videos.
[Android Apps and Games] ssenemosewa:
I use this app to maintain my sanity when it comes to doing anything with my tablet.

With all my desktops, Firefox/Palemoon plus AdBlockPlus allows me to get my work done without the constant bombardment from people trying to sell me things.

AdAway extends that environment to my tablet...and I am GRATEFUL!

Once you use an adblocker, it's hard to use a device without one. Or, as I prefer to phrase it, "Once you ad block, you never go back."
[Android Apps and Games] OffDatGoGo:
The modified and regular versions have always worked for me with KK based ROM's.

It has to be a ROM specific issue. I know since LiquidSmooth has incorporated their built in ad blocker, Adaway becomes disabled after rebooting.
[Android Apps and Games] Brandroid28:
I think when I used a ROM with a baked-in ad blocker, I enabled it; but then I deleted the hosts file it created. Then, AdAway built a new hosts file that stuck.
[Android Apps and Games] M3talen:
love it
[Android Apps and Games] sui785:
I always had an error when "applying hosts file". Fixed it by installing the older version v2.8
[Android Apps and Games] Mythos123:
how many host sources do you guys use?

mine is on the default setting.

Nexus 5 & Tapatalk.
[Android Apps and Games] zigeddy:
Adaway works fine for me, applyes all hosts, did not add my own in the list, but im wondering is there a way to after the adaway removes ads in browser, where ads used to be is left web page not available, and some text below that.. so in order to get back on the page before sometimes i must press back button that number of times of how many of those web page blocked ads are on the page? Is there a way for adaway to completely removes ads so there is only blank space left after it removes it? Only the browser bothers me btw, rest works fine..
[Android Apps and Games] MatVekk:
Don't work in my last 444. In 442 the mod versions was ok. But now don't work normal and mod apk [emoji24]

Apply. Reboot. But nothing.

Inviato dal mio Huawei P1 4.4.4 LiquidSooth
[Android Apps and Games] blackbuffalo:
Enable Read - Write file system first then apply.

Default file system in 4.4.x is readonly
[Android Apps and Games] MatVekk:
From a file manager? Or from application?

Inviato dal mio Huawei P1 4.4.4 LiquidSooth
[Android Apps and Games] diminou91:
From a file manager. Read-write on the host file then apply adaway and reboot.
[Android Apps and Games] irishpancake:
Can I just say, with regard to the Download link for AdAway v2.8.1 with d4rken mod in the OP is not working AFAICS!!!!

I even checked the page source, and gave up, downloading some silly so-called apk, which triggered an Avast warning......it's too small to be right.

I went to the source, and found this, from Adaway github, issue 292.......

where d4rken posted a link to his modified V2.8.1 for those having problems with the official release, like host files not being applied properly, hanging on apply, etc, etc.....

This is the link he posted, and I downloaded the modified version, which solved my problem on Moto G Kitkat........

here is the d4rken link, if there are any probs with posting this, mods please inform???

EDIT: This is the modified 2.8....not 2.8.1

http://goo.gl/eFUCy8

thanks to hjjiang for that info......still works OK for me!!!
[Android Apps and Games] xozaq:
Yes default settings. Didn't change anything in the settings. Reinstall didn't help. Even to download the host files I needed to pause adaway.
[Android Apps and Games] mrkillerhomer:
Hi, i am having problem with Adaway on my fold 4.

I am using non rooted version via VPN and installed latest version.

Everything works just fine when im on WiFi, but mobile data dont work.

Last night i reinstalled the app completely and it worked again on mobile data. Then today it no longer works, as soon as i disable WiFi and uses mobile it dont work. i disable the VPN and connection right away.

Now i just tested again with VPN on and it works again... seems very unreliable.

I enabled Always on VPN in android settings under VPN and adaway also monitors the connection.

Anyone know what could be the cause of this? i also updeted my phone to latest offical version.
[Android Apps and Games] ToXiTe:
AdAway only works for me if I set a custom DNS server in Private DNS settings.
[Android Apps and Games] zgfg:
Do you use dns.adguard-dns.com for Private DNS, another DNS server that bloks adds, and which one

And in that case, if you disable AdAway and use Private DNS only - does then ad-blocking still works for you

Hence finally, what exactly do you mean by and how do you test/validate that really AdAway (not just blocking ads) works only when you use Private DNS

(not that I don't be believe but I want to be sure that you encounter something similar as I did)

Supposidely, you run AdAway in root mode.

Did you ou test with WiFi and/or Mobile data?

If Mobile Data, did you check and removed Proxy from the APN?

Do you test in Chrome, maybe other Chromium browser and/or other apps?

Have you (and could you) check what DNS server is pushed by DHCP for that connection where you say that AdAway does not work without Private DNS
[Android Apps and Games] ToXiTe:
The hosts file only applies if I have Private DNS set to a custom one (currently set to Cloudflare, no ad blocking).

I used AdAway to manually block Twitter and it only works when I have the Private DNS to custom. It doesn't work if I set it to off or auto.

It works for both WiFi and mobile data.

I am using Chrome to test. If blocking works, I would get connection refused error when trying to open the blocked site.

The default DNS server provided by DHCP is a private one because I am inside a university network.
[Android Apps and Games] ithehappy:
Using non rooted version on pixel 2 xl. A banking app put under exclusion list still won't function, crashes on opening. Any idea?
[Android Apps and Games] mko000:
Wrong thread?
[Android Apps and Games] Nergal di Cuthah:
No, they're saying vpn adaway blocks banking app.
[Android Apps and Games] zgfg:
If you completely disable AdAway, does it work then?

If not, then it's not about AdAway but your banking app detects that 'phone is not safe', eg, due to the unlocked Bootloader.

Btw, do you pass Play Integrity API, Device and Basic Integrity - that's usually the first must-have for banking apps