yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] zgfg:
Yes, I made a mistake in the first post, for local file it must be triple slash but nevertheless it doesn't work - see post right before yours (Storage permissions missing?!)

Everybody has AdAway - can anybody make the whole thing working with v5.05:

- create a textual file myfile.txt with few lines like:

0.0.0.0 xda-developers.com

and save it to Internal memory, Download folder

- add his local myfile.txt to the list of hosts sources, something like

file:///sdcard/Download/myfile.txt

or whatever that will work

- open Blocked tab and find that xda-developers.com is then indeed listed
[Android Apps and Games] DiamondJohn:
I dont actually use AdAway to build my host file, for a while now, so not really knowledgeable about AdAway itself.

First thing, your test suggestion is kinda counter productive. If it works, then we wont be able to post such on this forum!:p (yes, I know we are on https://[B]forum[/B].xda-developers.com/)

Anyway, back to the problem, I tried the following locations, with the following results:

Using my own filename with a random but identifiable host name, and turned off all the other host sources, so only the host in my file should show up in the final host file.

/sdcard/Downloads/ FAILED:(

/storage/emulated/0/Downloads/ FAILED:(

/data/media/0/Downloads/ FAILED:(

/data/data/org.adaway/files/ FAILED:(

/cache/ FAILED:(

/data/local/tmp/ WORKED:highfive:

So the final one worked, and my host file only had the two local hosts and the single host sourced from my file located at /data/local/tmp/.

On a different note, and remembering this suggestion is coming from someone who does not actually use AdAway. It was confusing on first use that from the front page a swipe left (ie from right of screen to left) did not proceed to the next step, but I had to press the tiny "Next" text in the bottom right of the screen.

The reason I follow this forum is to keep up on host blocking and also to use AdAway for its DNS logging.

PS: I stopped looking for more locations once I got the one that worked, so more may be available. I was surprised the cache ones did not work.
[Android Apps and Games] zgfg:
Thank you for your testing and results ???

EDIT:

Indeed, it works with, reading and filling hosts file from:

file:///data/local/tmp/myfile.txt

However, it can not work for non-rooted users (using VPN mode) - they can not put a file to Data partition (without TWRP)
[Android Apps and Games] DiamondJohn:
Now you got me doubting myself:(. Here are the screenshots. Luckily it hasn't been long since I ran the working test.:cool:

1. The file located at /data/local/tmp

View attachment 5060813

2. The contents of the file with a single host

View attachment 5060815

3. The file / host source location I used. Note I turned everything else off. And you can see my other previous failed locations, unchecked

View attachment 5060807

4. The resulting host file of a tiny size in /system/etc

View attachment 5060817

5. The resulting host file contents

View attachment 5060811

6. My lists showing the one entry from the file, within adaway

View attachment 5060809

I just copied the source host file and have not done any checks/changes to permissions etc
[Android Apps and Games] DiamondJohn:
OK, so you edited the post after I responded.

Back to not doubting myself:good:

But they can, thats why I chose that path, because I knew it was kind-a lacking controls (and as such, thought AdAway could read the file). The trick is to not navigate through /data to get to /data/local/tmp.

for example, I used a non-root adb connection to push a (random) file to this location.

View attachment 5060821

And checked using my file explorer, which is rooted.

View attachment 5060823

just saw I also changed the file name to be Mexus instead of Nexus:o
[Android Apps and Games] zgfg:
I will check in the evening with my un-rooted phone

But on your screenshot, it is again /data/local/tmp.

So which path you use then, not though /data, to circumvent permission check?

I tried in Terminal (on the rooted phone but without su), it says Permission denied for:

ls /data/local/tmp

In

/dev/block/bootdevice/by-name

I don't see any path to get directly to local or tmp, as well as also not from ls (with su)
[Android Apps and Games] DiamondJohn:
I am running an unofficial LOS 17 build, on a GT-i9506, SELinux Enforcing,

The following screen shots should help, running from a non-root adb shell.

If I go straight to the path, it works.

View attachment 5060827

However, if I step down into it, I have no permissions as non-root to see the contents, until I get to the final location.

View attachment 5060829

;

I would guess I could also run a copy from /sdcard/Downloads to /data/local/tmp/

And remember, this was simply a path I have a vague memory of using (as a quick hack) in an app i built a while a go. ie there would possibly probably be more paths. I would look into adaway data and cache paths.

I'm out on this. It worked for me. Just try it for yourself.
[Android Apps and Games] zgfg:
Interesting, on my Xiaomi Mi 9T with MIUI 11/Android 10, from Terminal and without su, I have Permission denied for both:

- for "ls /data/local/tmp"

- for "ls" once I'm already in "/data/local/tmp"

But with adb shell (without su), I can indeed pull/push from/to "data/local/tmp"

Tested later also on Huawei Mate 9, EMUI 9.1/Android 9, not rooted (Bootloader locked) and it worked the same way.

On that phone AdAway must be running in VPN mode (it does) and since AdAway cannot access internal memory (because of missing Storage access), this trick with adb and /data/local/tmp is the only way to give it your own, local hosts source ?

Anyway, it would be much easier if AdAway would be asking for Storage permission (like DNS66 does), then user would be able directly to create and edit his txt file on the phone and add it to Hosts sources with the URL like: file:///sdcard/Download/myfile.txt
[Android Apps and Games] DiamondJohn:
[MENTION=7786725]zgfg[/MENTION]

Isnt MIUI renown for following their own android security/permissions:confused:

As for why it doesn't work on your device, if you cared to find out why, by stating the obvious, a logcat would be the obvious route for investigation.

as for it kinda working, just call me Diamond "mr hack" John;)

As to it being easier, yes it would, but I have root, so, meh.;)

Another thing waaaay off topic. I have a huge host file, but had an app that appeared to always allow an ad to slip through:mad: So, doing the obvious, I went to the DNS logging (which in reality is my use of AdAway). and nothing was logged. i tried a few times and still nothing logged. thought it may of been cached so rebooted, wiped, forced close etc etc etc. Then i noticed it was the same ad every time, and on actually reading the ad, it was an ad for the same developers other aps. It was an image compiled into the ap!!!

[IMG="face palm"]https://img.xda-cdn.com/zWs7g44BxKBPGcsSyToHD1vc2vQ=/https%3A%2F%2Fgithub.githubassets.com%2Fimages%2Ficons%2Femoji%2Funicode%2F1f926-2642.png[/IMG]
[Android Apps and Games] ipdev:
[MENTION=5417899]DiamondJohn[/MENTION]

Not that I want to push you away from using AdAway but, TCPDump is third party.

AdAway LICENSE GitHub - Link

Also, some apps use a cache file for ads when the device is off-line. (or ad server is blocked ;) )

Not sure if that is what you ran into but, if so, you can clear the cached ads and then block it from regenerating, it may clear the ads in that app.

[MENTION=7786725]zgfg[/MENTION]

Could you create an issue on GitHub for this?

I haven't had much time for testing anything recently but, I assume it stopped working in v5.0.4

Part of the v5.0.4 (Change Log)

Remove WRITE_EXTERNAL_STORAGE permission (use Storage Access Framework instead)

You could check on the v5.0.3 and v5.0.4 releases to make sure.

The one thing that jumps out at me, when using Storage Access Framework is how files are shared.

persist-permissions developer.android - Link

--

Side Notes:

file:// is a protocol. Same as http:// https:// ftp:// ftps://

The content:// protocol is used with a content provider to share files.

The third / is the start of the full path to the file.

/sdcard/Download/TestFolder/NameOfFile.xda

If you use just sdcard/Download/TestFolder/NameOfFile.xda

It will look for a directory named sdcard in the current directory, instead of starting from the root directory.

As for /data/local/tmp/ it is just that.

A temporary use directory and should be read/write access even with limited permission.

ADB normally has a little higher permission than user.

A terminal app may have different access to the device, compared to ADB or a file manager app.

This will very depending on device, ROM and the way permission(s) are handled.

Cheers. :cowboy:
[Android Apps and Games] DiamondJohn:
I remember a while back I used a script / shell commands to do the same (maybe busybox was involved). But, AdAway is simpler. I checked your link, and there was no pre-compiled android ap that I saw.

yep, already thought of that, and thats why (as posted along with my other drivel) I cleared the cache. I also uninstalled, disconnected from net etc etc etc. i am pretty sure its a static image. its the exact same ad and only ever for his own aps, which was the giveaway,

It was a hack to achieve the request, nothing more and nothing less.

One thing that did occur to me, isn't a "file://" source the same as a blocklist? and I assume that works for non-root
[Android Apps and Games] zgfg:
[MENTION=7280276]ipdev[/MENTION]

Good point about GitHub v5.0.5 ChangeLog.

Just checked with v5.0.3 (still had its downloaded apk on the phone) and yes, it has Storage permission (screenshot) and reading from /sdcard works like a charm

I was thinking about submitting an Issue to GitHub anyway - done:

https://github.com/AdAway/AdAway/issues/2131

Btw, content:// URL type/protocol (as used by DNS66) has an advantage that user can simply navigate to the file through the file explorer app (user does not need to know that e.g. /sdcard is path to Internal memory).

But it has disadvantages:

- Link is long and not human readable (if something goes wrong you cannot 'debug')

- If several file explorer apps are installed, you will be given a choice which one to use to navigate to the file.

Their links to the same file are different (and not 'readable').

But when you save the link to DNS66, it will use default Files app

Result:

- I navigated to the file by MiXPlorer (using it always)

- DNS66 was trying to open the file by Files and it was failing

- It took me crazy to realize what was the problem

Therefore, standard and 'readable' files:// format (as in AdAway v5.0.3) is IMO a better option, don't know why [MENTION=2822685]PerfectSlayer[/MENTION] opted to remove it from v5.0.5
[Android Apps and Games] PerfectSlayer:
Hi all,

Thanks for investigating the issue. There is obviously a side effect with the storage permission removal.

I used it for settings import / export then I move to SAF (Storage Access Framework) API so I removed it.

It has for side effect the application can no more access external storage to read your hosts file... (note: It should not work in the previous versions if you don't enable the permission manually or trigger the settings export feature first...)

As Google is trying more and more the hide the underlying file system and pushing hard for SAF usage, I think I will (finally) rework the UI to select a file on the device storage (using SAF which will trigger any file explorer you have or the default file selector of the system).

So the app can get access to this file only (I need to check how I can maintain this permission on this file, I guess there is a flag or something like that) and I won't have to request read access for the whole storage (better privacy).

I am not sure exposing the file and protocol is the easier way for users (yes, there is a triple slash as per the specification =P) and I think I can make a clean UI showing the picked file name.

But it will require some time though ^^' In the mean time, a good workaround is to use the /data/local/tmp folder.

P.S. : I hope you are all well =) Stay safe!
[Android Apps and Games] Davy49:
Hi,

I keep hearing about being able to run adaway in vpn mode if your phone isn't rooted. Does anyone know how to do this?
[Android Apps and Games] Luniz2k1:
Read the OP, download v5.0.5
[Android Apps and Games] kond0:
[MENTION=2822685]PerfectSlayer[/MENTION] I think something went wrong with release 4.3.5 on F-Droid, it's been three weeks and it's not there yet.
[Android Apps and Games] darkstar73:
Exactly how does the VPN work in Adaway 5? Whose servers is the traffic being routed through?
[Android Apps and Games] knpk13:
Maybe this should be added to the OP

https://xdaforums.com/showthread.php?t=2190753&p=82281687
[Android Apps and Games] darkstar73:
Thanks! That's the info I was looking for.
[Android Apps and Games] zgfg:
I used several times to (successfully) configure blocking ads in Chrome (with DNS66, AdAway hosts mode and AdAway VPN mode - it means I did it last time maybe three months ago when v5.0.2 was released) by following the same procedure:

https://wccftech.com/how-to-fix-dns-based-ad-blockers-on-chrome/

https://www.malwarefox.com/block-ads-android-chrome/

https://www.android-hilfe.de/forum/...moeglich-ist.900205-page-3.html#post-11734599

Now I wanted to do it once again with Chrome v84.0.4147.89 but cannot find chrome://net-flags any more.

There are chrome://flags and chrome://net-internals but none of them contains the old Async DNS Resolver option

Does anybody know where that Chrome internal Async DNS Resolver can be disabled now?

It is necessary to make Chrome unable to reach the servers pushing ads (otherwise Chrome bypasses AdAway)
[Android Apps and Games] fwork:
But does it change OTA? is it possible that if i changed hosts without enabling "systemless host", i cant update via ota?
[Android Apps and Games] zgfg:
OTA policies are vendor dependent
[Android Apps and Games] PerfectSlayer:
I had a look to the last build log.

Something is wrong with the NDK configuration of F-Droid build server: https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/org.adaway.yml#L520

I will make a PR but I don't know if it will trigger a new build for this version.

[/URL]

Never heard about it. I only disable "lite mode" (ex "data saver") and it works for me.

It is now! Thanks =)

And for the curious ones, the storage issue is addressed here with some screenshot of the new behavior.
[Android Apps and Games] zgfg:
Actually, I do have Lite mode off.

Two phones, both with latest Chrome, AdAway v5.0.5 and same hosts sources, opening the same sites/pages with both.

- On the rooted phone, running AdAway in Hosts mode, no ads in Chrome (ok, maybe one from XDA at the bottom of each page(

- On the not-rooted phone, running AdAway in VPN mode, Chrome is full of ads (but no ads in other apps)

E.g., when I open this XDA AdAway thread in Chrome, I have two or three ads per page (not from XDA but about cars, bycicles, etc,) on the phone running AdAway in VPN mode, and none of those ads on the phone running AdAway in Hosts mode

Does this Lite mode off work for you also to block ads in Chrome also in VPN mode?
[Android Apps and Games] liorderei:
Hi guys,

I'm having in issue where some of my apps text content remains blank, for example mails in Gmail app, news apps in my country, and some others.

I'm not sure my issue caused by adaway, but I don't see any other reason for it.

Can you please help?

Thanks,

Lior
[Android Apps and Games] Nergal di Cuthah:
What host sources do you use. Are you running adaway 4 or 5(beta). If 5 are you in hosts mode or (nonrooted) vpn mode.
[Android Apps and Games] liorderei:
HI Nergal, thanks for replying. I was able to solve this, the issue was with Google Webview :) had to downgrade it.
[Android Apps and Games] ashish1989:
Is there any way to import filter lists from ublock origin to adaway
[Android Apps and Games] kos25k:
Hello.I wonder how to whitelist these dns,so to let ads pass to a new app called airtalk.Do i just press ✓ symbol to all these and reboot?View attachment 5067473
[Android Apps and Games] knpk13:
Ever since we switched to Steven blacks hosts file, I've noticed that I need to add more and more domains to the white/allow list to get my apps working (I have never needed to use the whitelist feature before this change). The latest one is something as basic as adding a Google work account, which FC's because www.googletagmanager.com could not be reached. I'm unsure if any other app or background functionality is broken because of the list (I could be unaware of it). I'm also still getting ads on some websites like www.hearthstonetopdecks.com with this list although I did not get ads on that same website with the previous default (now discontinued) list.

Does anyone know of a better list than Steven blacks I could use? I looked up googly tag manager (didn't really understand what it's for) but it doesn't seem related to ads at all.
[Android Apps and Games] Doomkopf:
I use SteveBlack's list since a few years, and never had a broken app once. You could try Energized, Energized and SteveBlack are the two most popular ad-list-provider in the host format (I think at least). You could give that a try
[Android Apps and Games] andy356:
Even the tiniest list on Energized, Spark, contains Steven Black's list.
[Android Apps and Games] Doomkopf:
oh, I didn't know that :mad: thanks for the info
[Android Apps and Games] Nergal di Cuthah:
Mvps is smaller and more focused on adservers.

https://winhelp2002.mvps.org/hosts.txt
[Android Apps and Games] Tommydorns:
Hello, I'm not sure if we can support for beta here, if not I'm sorry and you delete this post. I just tried the beta 5.0.5. Very nice layout by the way. For some reason quite a few ads aren't being block like in stable and I can't figure out why. Is there something I'm not setting up properly. I'm using Root method. Is there an extra step we have to take with this.
[Android Apps and Games] knpk13:
Thanks, I found this review of different lists and it paints a pretty bleak picture of Steven Black's list with regards to false positives and blocking more than just ads (think it's an old review though). Other reviews seem to echo the same sentiment although a lot of the info seems old or scattered. I think I'll first try only using the other 2 default adaway lists and add MVPS if I still see ads.

https://linuxreviews.org/Comparison_of_HOST_file_blacklists

Edit: I am unable to re-enable Steven Black's list (update: actually this is happening with all of the default lists) in the settings. Even when I hit the checkbox and update sources, the number does not go up from 15k to 57k again although the text says 3 sources are enabled. Only clearing the app data solves that. Is anyone else experiencing this? I'm using the 5.0.5 beta. Adding and removing other lists like MVPS works fine.
[Android Apps and Games] ipdev:
I ran into it the other day when trying to regenerate the blocking list after adding to the allowed list.

If you deselect a host source after it's been used, AdAway will not download it again since it sees it's up-to-date.

Either wait until the host source is updated.

or

As you said clear data and setup AdAway again.

Cheers. :cowboy:
[Android Apps and Games] rockingondrums:
When I try to add one of Steve Black's alternate lists, I get problems. When adding, it says Online unknown. When building and applying, I get a perpetual notification that there is an update. "Need update for -391 minutes". The lists are both at GitHub. Anyone have a fix? Thanks.
[Android Apps and Games] zgfg:
Please specify which AdAway version are you talking about (there is a parallel discission here about the old AdAway v4.3.5 and the new codebase v5.0.5)
[Android Apps and Games] rockingondrums:
Oops, 4.3.5.

I just installed 5.0.5, everything appears to be fine. My alternate host shows it was last updated 4 hours ago. These new counters are interesting, but they are at 0, maybe because of new install. I'm going to see if I can get that counter ticking.

Update: It seems ads are not being blocked strictly enough.
[Android Apps and Games] bradical711:
Hello. I have a pixel 4 xl android 10, June security update on dirty unicorns 14.4 custom ROM. I am rooted w/ magisk and systemless hosts has been enabled as well as a reboot etc. AdAway v4.3.5 has actually worked perfect for me until recently however. I searched initially for answers within the thread but was successful in my attempt. There were a few a posts I read from 2017 regarding my issue with answers that didn't really seem viable/usable today.. Don't know if this is necessarily AdAway's fault but I wouldn't have noticed the issue without AdAway. So my /system partition is full and only has ~2.75MB free of space left compared to ~785.5MB used. My issue is that my AdAway hosts file should be about 60MB or so as before but it's a measily ~3.6MB now because AdAway can't write to a full system partition. So my question is, without actually removing any crucial files etc, how could I free more space for my hosts file? This wasn't an issue before but I can't figure out how/why my /system partition is so full. A point in the right direction or help is kindly appreciated, thank you in advance!
[Android Apps and Games] zgfg:
Disable Systemless hosts in Magisk and check if hosts file drops to the original few KB, to make sure AdAway correctly uses the systemless overlay

With SAR (probably your updated firmware), system partition may or may not be read only but the file system is made tight - no space is left since it is not supposed that user will make changes anywhere out of data and Internal memory

That is why Magisk provides systemless overlay (dynamically mounting files and folders, making them to appear as if you changed to the system partition)
[Android Apps and Games] zgfg:
Sorry, wrong thread
[Android Apps and Games] Jaiiiiiiiii:
Can i bypass player error 224003 when watching in streaming sites?

I cant seem to h some videos on some sites especially with jwplayer i think.
[Android Apps and Games] jasonbiggs:
Hi. Foxnews.com and foxbusiness.com videos never stream. when Adaway disabled then they stream. what changes must I make? I have already added the domains to the whitelist but still no go. Thanks.
[Android Apps and Games] bradical711:
To get back to you, I tried what you said. Disabling magisk module results to original hosts file. Rebooting with systemless hosts module enabled results in modified hosts file again but my hosts file is still locked at around ~3.6MB. I get what you're saying but I don't understand, if that's how's it works, why is my hosts file still ~3.6MB.? I get the same result with any amount of sources added btw. Hosts file is now always locked at this specific amount of 3.6MB because (I'm assuming here) my /system is full. Again, AdAway has worked fine for me since forever ago on any device I've used including this one. This was only a recent issue when I attempted to update my hosts file. AdAway subsequently stopped working after attempting to update my hosts file. Now I'm capped at 3.6MB.
[Android Apps and Games] v12xke:
I suspect it is one of your sources because I use both those sites regularly with no video issues and no whitelisting. Other than the default, which sources are you using? May be an extension in your browser if you use FF Android Beta with extension support. Try disabling all but the default sources and then add them back in one by one.