yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] shaqman89:
Logcat:

http://lmgtfy.com/?q=how+to+get+logcat

Partition size, already given how above, but more here:

http://lmgtfy.com/?q=how+to+check+system+partition+size+android

Or you could do both by using this app:

https://xdaforums.com/android/apps-games/app-temefi-comprehensive-documentation-t3806260
[Android Apps and Games] Aghoraswami:
Hi

[MENTION=5417899]DiamondJohn[/MENTION]

Here are logcat giving info about adaway and partition sizes.

Thank you in advance. [MENTION=5701712]shaqman89[/MENTION]

Thank you very much for info. I thought some way I could get the log from adaway itself so asked.

Edit

For some reason it's not attaching and now unable to see option to attach. Will try again.
[Android Apps and Games] Aghoraswami:
Hi sorry for double post but can't upload it in earlier post hence doing it in next.
[Android Apps and Games] arifsukmaraga:
Clear cache and dalvik.
[Android Apps and Games] DiamondJohn:
I would avoid directing to a single person or two, as there are many more people on this thread who know considerable more than me, and I may just happen to have other priorities on the day.

If you use TeMeFI, the best (ie easiest for me) may be to use "Device Details">"Partition Info">"DF All in Human Readable" It gives info in MB etc;) My suspicion is that your system partition is low on space. I personally used to own an N5 that I could only flash smaller GApps onto, so a smaller hosts file was also the go.

I don't think we would get any more details out of the logcat than you have captured, however, for future info, a suggestion for using TeMeFI:

1. do not filter to only errors. use the "Logcat">"Logcats">"Logcat Default" its easy enough to filter after the fact (I could even load your log into my TeMeFI and filter it there). Also, for errors, there may be a warning or debug or even info log triggered, that explains the root cause.

2. To minimize the log size, run "Logcat">"Logcats">"Logcat Clear", then do the thing you wish to capture, then run the "Logcat">"Logcats">"Logcat Default" This step will limit the size, to capture the problem more specifically.
[Android Apps and Games] jcmm11:
Assuming that you're using Magisk and you have the systemless hosts option enabled my suspicion is that the Magisk partition is low on space. What's the output of (in a terminal emulator, as root)

df -h /sbin/.core/img
[Android Apps and Games] Aghoraswami:
Hi

Did it but couldn't get any outcome it is same situation.

Thank you for your reply.

---------- Post added at 04:35 PM ---------- Previous post was at 04:06 PM ----------

Thank you for reply tried putting the code provided in to terminal emulator and got message not found.

So kindly can you please share specific steps to be taken or how to so I can produce desired results

Thank you in advance.
[Android Apps and Games] Aghoraswami:
New logcat as per suggestion by Diamond John

Hope this can shed some light . Thank you in advance to all.
[Android Apps and Games] sandaljrpit:
Hi...

my system turns out to change even though it has activated systemless hosts in magisk and in adaway. is this normal? Sorry, I don't know what I should do. thank you :)

Adaway new version.
[Android Apps and Games] guest4711:
As long as you are running magisk you'll see the systemless hostfile which is mounted into /system/etc (while the original one is not visible).

To verify that your original hostfile is unchanged you should boot into TWRP and use it's filemanager.
[Android Apps and Games] DiamondJohn:
Ok, I am surprised that the new logcat actually did provide some extra info.:good:

In your logcat

10-31 20:20:41.334 10133 3721 3810 I AdAway : Copy hosts file with target: /system/etc/hosts
10-31 20:20:41.335 10133 3721 3810 I AdAway : [B]Size of hosts file: [COLOR="Red"]19771673[/COLOR][/B]
10-31 20:20:41.335 10133 3721 3810 I AdAway : Checking for enough space:[B] Target: /system/etc/hosts size: 19771673, availableSpace: 69632[/B]
10-31 20:20:41.335 10133 3721 3810 E AdAway : Not enough space on partition!

In your df Results

Filesystem 512-blocks Used Available Capacity Mounted on
...
/dev/block/mmcblk0p24 6061600 2764064 3297536 46% /sbin/.core/mirror/system
[B]	/sbin/.core/block/loop08 120800 118048 2752 98% /sbin/.core/mirror/system/etc/hosts[/B]
/dev/block/mmcblk0p48 999312 671640 327672 68% /sbin/.core/mirror/vendor

So from what I am understanding, you have a 19.77MB host file trying to be copied into a partition with only 6.9632MB available.

I personally do not use Magisk for systemless hosts, but maybe someone else here or in the Magisk forum knows how to actually increase the size of the selected Magisk partition?

I also found that in your DF results, the "/sbin/.core/block/loop08" partition was being used for multiple items (I would *guess* multiple Magisk modules); ie they were all consuming space on a fixed size partition. It really sounds like something that people using Magisk would have to deal with very often.
[Android Apps and Games] sandaljrpit:
forgive me for sending a wrong screenshot :o

So, its normal ?
[Android Apps and Games] shaqman89:
If you are checking when the rom is running, yes.

If you check it via twrp and the same thing happens, then no.
[Android Apps and Games] guest4711:
It is normal cause you are checking your modified file (see the path: /sbin/.core/mirror/system/etc/) which is mounted into /etc/system (hiding the original file which remains untouched and unchanged).
[Android Apps and Games] sandaljrpit:
Thanks for answer :)

but why does the size also change after I activate the hosts source? shouldn't it still be on a fixed size (original 56kb)? that is what makes me confused, the size of the hosts changes in /sbin/.core/mirror/system/etc/ .
[Android Apps and Games] ktmom:
Both file sizes will apparently change because the one in Magisk is mounted on top of the system one during boot. To verify that the one on the system partition really isn't being modified, you need to do what you were told to do before; boot into TWRP recovery and mount system then view the file in either the file manager or command line in the terminal.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] anwar amu:
For those who is having problem with WhatsApp PIP mode in youtube link, try this updated whitelist. It does solved my problem.

I hope it helps
[Android Apps and Games] shaqman89:
Are you sure all of that is needed for WhatsApp PIP?

Looking at that, google's ad distribution network is included which would also leak quite a number of ads at other places.

Just an idea, have you tried enabling one by one and see whether pip still works or not.

Personally, I think the first one is enough, though I can't be sure since I don't use that feature.
[Android Apps and Games] anwar amu:
I'v tried not to use all of it. But it failed to load. :(
[Android Apps and Games] anwar amu:
Here is the result. It failed to load
[Android Apps and Games] anwar amu:
That's why i suggested app whitelist exclude feature in adaway in the first.

I know that app adhell 3 could achieve such feature on it. But it downside is we have to generate new knox key every 3 months and it have limits on host list. But the main problem is adhell need to always running on background.
[Android Apps and Games] Ultramanoid:
AdAway is a hosts file manager. It works with hosts files, which apply to IP addresses, not applications.

https://en.wikipedia.org/wiki/Hosts_(file)

You're looking for a different kind of application. And there are several that work like that, you can try any of them.

Edit : Alternatively, as has been suggested many times before, find which specific addresses hosts affect the application you're concerned with, and allow them with AdAway's whitelist feature when building the hosts file.

Edit 2 : And as many point out in posts after this, a hardcoded direct IP address will still circumvent the host filter.
[Android Apps and Games] totalz:
I'm trying to block some video ad from an app, I added some IPs in the blacklist, DIsabled and re-Enabled newest hots file, reboot. I started the app and still see it's connected to those IPs. Could this be a bug?

Also added it to redirection to 127.0.0.1, no luck...

It would be better if I can just apply 'Your lists' without all host files downloading and merging!
[Android Apps and Games] ktmom:
Uhm...you can. Just disable (uncheck) the host sources.

Unless you are suggesting that you want an interim update that keeps the sources without downloading them again and also applies changes to white/black lists. IMHO, that is more work than it's worth for the dev. The previous sources would have to be stored on the device to be able to apply a whitelist against it. On low resource devices that's a problem.

In your case, the problem could also be a app cache or, if the app it's going straight to an IP address, DNS is not utilized at all thus bypassing the hosts file. Adaway can not help at all in this case.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] DiamondJohn:
It blocks hosts, not IP's. If a specific IP is used by an app, it will not go through the hosts file, and therefore will not be blocked.

What you may find though, is that the IP you are blocking was resolved from a host name. Maybe try a reverse lookup to find all the hosts that resolve to the IP you tried to block.
[Android Apps and Games] jcmm11:
The result would probably verify what [MENTION=5417899]DiamondJohn[/MENTION] already told you. If you input the command as I gave it to you it should work. You do realize there's a space between the df and the -

Just make sure you try the command as root.
[Android Apps and Games] ellard354darl:
Enabled it you should just Download Bluestacks so it will work with other android too.
[Android Apps and Games] totalz:
Well, white list may not not worth the work, but doable, just few lines of code, reg-exp search and replace. Black list, that would be just adding/modifying at the start or the end of the file with commented line to separate it from the download list... again, just few lines of code...

---------- Post added at 01:38 PM ---------- Previous post was at 01:37 PM ----------

Thanks for the clarification, I will try reverse lookup...
[Android Apps and Games] ktmom:
If you would like to develop this app, fork the sources and make the forked app work the way you would like it to. That is not intended to be sassy, but it is the way open source works.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] shaqman89:
As mentioned above, you could always add that feature yourself, and then do a pull request. It is, after all just a few line of codes.
[Android Apps and Games] totalz:
To me, it's usually setting the env to get the whole thing working first that takes ages... :crying:

Any workaround for ip that doesn't have a domain name?
[Android Apps and Games] Luniz2k1:
Even if you knew the domain name for the IP address it would not help at all if the application points to an IP address for the ads.
[Android Apps and Games] DiamondJohn:
Firewall.
[Android Apps and Games] guest4711:
To block a connection to a known ip address you could use any package filter/firewall like AFWall+ (Control network traffic) - https://f-droid.org/app/dev.ukanth.ufirewall
[Android Apps and Games] jcmm11:
iptables rules. Even if you install afwall+ (which is a great app) you'll still need to write iptables rules if you want to block specific IP addresses. On its own afwall+ blocks all internet access on a per app basis.

https://xdaforums.com/showthread.php?t=1957231
[Android Apps and Games] guest4711:
Yes, but you may add the rules to AfWall+ as "custom script", e.g.

iptables -A "my-app" -d 8.8.8.8/32 -j REJECT

if you wish to block accessing 8.8.8.8
[Android Apps and Games] andrea0807:
Hi, how do I remove advertising from Spotify and YouTube? Which Host sources should I add?

Inviato dal mio MI 8 utilizzando Tapatalk
[Android Apps and Games] ktmom:
If you're new to hosts file DNS ad blocking, starting with the Adaway wiki will probably help.

You should also search this thread on those two apps to discover why you will likely need a different solution for them.

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] manpildo:
You can't with adaway.
[Android Apps and Games] TigerKing:
Are there any other host sources? links?
[Android Apps and Games] Ultramanoid:
The internet is full of them ! And they are free ! XDA also has this thing called 'search' that uses arcane technical tricks to retrieve information posted by others in this thread and gives it to you... We live in a wonderful magical age of wonder.
[Android Apps and Games] pieceofphil:
Anybody know if perfectslayer has forked adaway, as it seems he's updating it regularly on here

https://androidfilehost.com/?w=files&flid=249276&sort_by=date&sort_dir=DESC
[Android Apps and Games] Ultramanoid:
Those are the same builds that he posts here in the thread. 4.x is in development, which is why 3.3 is still the stable version in the thread title.

Edit : And no, it's not a fork, mrRobinson handed over the keys to him, as he's much more active and taking over. Just read through the thread or subscribe to it to follow development and releases.
[Android Apps and Games] PerfectSlayer:
Really? If adding features such as apply user lists without re-downloading hosts file is only few lines of code to you, feel free to code and share it!

Because setting a dev environment is only 3 command lines away and I documented everything here: https://github.com/AdAway/AdAway/blob/master/CONTRIBUTING.md#building-the-project

For the record, writing contributing guide took me a good amount of time and I already spend few hours investigating this feature. Don't underestimate the amount of work here… (even if I frequently ship FC builds XD)

I will need to change the http client to support http cache mechanism which will be the cleanest way to handle cache.

Doing so, you could even add a new source and apply it without re-downloading previously declared sources.

If useful, the command line used by AdAway is the following:

tcpdump -i any -p -l -v -t -s 512 'udp dst port 53'

Except the app is bundling its own binary but the arguments work the same.

I forked it years ago to start what becomes the 4.x version but now its the official build (same signing key and source are on github project).

I also got some private messages for support. I will post them in order to share and get help from everyone. Please consider posting on the forum instead of reaching me by PM if your request is not private. Thanks!

Hum, you need to tell us more if you want more help here.

As far as I remember, it was already me which makes the 3.3 release, so yes, I am an official maintainer. You could have a look at the first post and at the GitHub organization to find my name on them.

There was several beta releases the last months and I plan to share them as public stable build as soon as the forum users find them stable and polish enough.

About update, I did not have a lot of spare time lately but I saw [MENTION=2148774]Vankog[/MENTION] updated the translations. It should worth making a new build to share the great work of locale contributors ;)
[Android Apps and Games] jcmm11:
As long as you have systemless hosts enabled in Magisk don't worry about the apparent size changes in hosts. Both the mirror and the one in /system/hosts are actually the bind mounted versions. The underlying (about 56 bytes) version is still there, just masked by the bind mount.

If you want to see the underlying version simply turn off the systemless hosts option in Magisk. That will revert the bind mount and show the underlying hosts. Just remember to turn it back on before updating the hosts in Adaway again.
[Android Apps and Games] DiamondJohn:
I have never used the DNS logger, have no plans to use it, so the following is simply theoretical by all means, and I understand the idea of "ask 1000 programmers the same question, and you will get 1000 different solutions" So please ignore the following at will ;)

Would it be better to filter the traffic by "port 53" instead of sniffing the data in the every packet for "udp dst port 53"?
[Android Apps and Games] ipdev:
So others noted it before, may have been buried by Host source will not work...

Just in case it was missed, file:// protocol fails on 4.0.9 and 4.0.10.

I don't think a log was provided before. Logcat

Starting from line 222

AndroidRuntime: FATAL EXCEPTION: pool-3-thread-1
AndroidRuntime: Process: org.adaway, PID: 4945
AndroidRuntime: java.lang.ClassCastException: sun.net.www.protocol.file.FileURLConnection cannot be cast to java.net.HttpURLConnection
AndroidRuntime: at org.adaway.model.hostsinstall.HostsInstallModel.downloadHostSource(HostsInstallModel.java:291)
AndroidRuntime: at org.adaway.model.hostsinstall.HostsInstallModel.downloadHostsSources(HostsInstallModel.java:259)
AndroidRuntime: at org.adaway.ui.home.HostsInstallViewModel.lambda$update$2(HostsInstallViewModel.java:110)
AndroidRuntime: at org.adaway.ui.home.-$$Lambda$HostsInstallViewModel$hr_O0jGNR8I8qQyGthIQYups81s.run(Unknown Source:2)
AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
AndroidRuntime: at java.lang.Thread.run(Thread.java:764)

So I gave it a go, grabbed a log, and hopefully it will help.

Cheers. :)
[Android Apps and Games] sandaljrpit:
Thanks for answer..

Ehmmm....I want to provide more information. but I don't know what to do.
[Android Apps and Games] ktmom:
I can also confirm this problem. Essential PH-1 running Pie. Adaway 4.0.9-11d3f561
[Android Apps and Games] shaqman89:
Have anyone tested this in 4.0.10?

My redirects when imported all goes to blacklist.

Some example that I'm using:

# This hosts file contains exported entries from AdAway.

## Reddit

151.101.129.140 reddit.com

151.101.129.140 ww.reddit.com

151.101.129.140 www.reddit.com
[Android Apps and Games] ktmom:
Yup, again I see a similar behavior after exporting the unified "Your Lists" file, wiping data and cache for Adaway and importing the "adaway-export" file. Checking the adaway-export the redirect is correctly listed but in my case, the redirect gets added to the white list. I'm going to guess that if there are no whitelist entries in the file, it will be processed to the blacklist.

I am certain we went through this exercise a few months back, but evidently my search powers hit kryptonite today because I can't find the discussion [emoji849]

I'm adding a brief logcat, but it doesn't help any.

Essential PH-1 running Pie. Adaway 4.0.9-11d3f561

(Sorry not attaching txt files cause phone app won't let me and not near PC)

Logcat:

11-06 07:22:23.288 D/AdAway (11579): User lists URI: content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Fadaway-export

11-06 07:22:23.365 D/AdAway (11579): Does not match: # This hosts file contains exported entries from AdAway. this line exists in the adaway-export

11-06 07:22:23.366 D/SurfaceFlinger(1005): duplicate layer name: changing org.adaway/org.adaway.ui.MainActivity to org.adaway/org.adaway.ui.MainActivity#1

11-06 07:22:23.452 D/SurfaceFlinger(1005): duplicate layer name: changing Surface(name=8c3408d org.adaway/org.adaway.ui.MainActivity)/@0xb3088a8 - animation-leash to Surface(name=8c3408d org.adaway/org.adaway.ui.MainActivity)/@0xb3088a8 - animation-leash#1

11-06 07:22:23.655 W/SurfaceFlinger(1005): Attempting to set client state on removed layer: org.adaway/org.adaway.ui.MainActivity#0

11-06 07:22:23.656 W/SurfaceFlinger(1005): Attempting to destroy on removed layer: org.adaway/org.adaway.ui.MainActivity#0

11-06 07:22:25.721 V/ACCESSIBILITY(3099): CLICK - text: null; viewId: org.adaway:id/lists_navigation_whitelist

11-06 07:22:25.722 V/JOAOMGCD(3099): AutoInput-CLICK - text: null; viewId: org.adaway:id/lists_navigation_whitelist

adaway-export:

# This hosts file contains exported entries from AdAway.

127.0.0.1 ad.flipboard.com

127.0.0.1 api.crashlytics.com

127.0.0.1 apps.crashlytics.com

127.0.0.1 beta.crashlytics.com

127.0.0.1 blog.crashlytics.com

white *vimeo.*

white extend.vimeocdn.com

white f.vimeocdn.com

white fresnel.vimeocdn.com

192.168.0.3 mymach.dev

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] PerfectSlayer:
Hi all,

A quick post to thanks for the latest bug reports. I was able to fix them quickly so it is time for a new dev build.

As previously said, this new version will include latest translations :)

Changelog:

Update translations from Transifex

Fix crash using file:// protocol for hosts source

Fix redirect list import

Thanks:

Special thanks to [MENTION=7280276]ipdev[/MENTION], [MENTION=6617276]ktmom[/MENTION] and [MENTION=5701712]shaqman89[/MENTION] for theirs helpful bug reports and [MENTION=2148774]Vankog[/MENTION] for the locales update.

Download:

AdAway 4.0.11 on AndroidFileHost (md5: f4d7e9cfb0603673bf4d77d484e7e567)
[Android Apps and Games] PerfectSlayer:
The path "file://storage/emulated/0/Download/hosts.txt" seems invalid. It should be "file:///storage/emulated/0/Download/hosts.txt" where "file://" is the protocol and "/storage/emulated/0/..." is the path.

So you need three slashes after the column ;)
[Android Apps and Games] ktmom:
Perfect!

I thought I tried that. Kryptonite is following me around today [emoji12]

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] DiamondJohn:
Am I right in my understanding that if one host source file needs updating, ALL host file sources will be downloaded, not just the one that needs updating?
[Android Apps and Games] shaqman89:
Also could confirm that 4.0.11 fixes the redirect import issue.

Thanks :good::good:
[Android Apps and Games] Toutatis_:
Just use the raw hosts: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[Android Apps and Games] don_dolarson:
Does latest version support Brave browser?
[Android Apps and Games] ktmom:
Adaway is a hosts file manager. There is no direct interface between Adaway and any other app. If brave browser uses DNS lookup, then the first place it looks for the IP address of a domain name is the device's hosts file.

Adaway allows the user to conveniently redirect a domain to an IP address different than the actual domain's IP address, effectively blocking the loading of the domain. By this method, ads can be "blocked".

"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
[Android Apps and Games] jeflisboa:
For me work fine on KitKat

Enviado de meu Nexus 4 usando o Tapatalk 2
[Android Apps and Games] :
+1 no problem/no ads with cm11 on all my nexus devices ;)

Gesendet von meinem Nexus 4 mit Tapatalk
[Android Apps and Games] Vineet3:
Hey folks! Kinda new here.

Can anyone here help me figure out why Adaway usually blocks Facebook images? And how to undo the blocking for Facebook?

Sorry if this is the wrong thread to ask a question, but I really need help with it. Thanks!
[Android Apps and Games] chrisdlc119:
Yes, that is really bad. Using AdAway again :)

Enviado desde mi LG-E610 mediante Tapatalk
[Android Apps and Games] sanju.cvrce:
Really good....
[Android Apps and Games] haamza21:
Nice nice..:)

Gesendet von meinem HTC One X mit Tapatalk
[Android Apps and Games] Telyx:
Whitelist *.akamaihd.net and you should see images again.
[Android Apps and Games] Vineet3:
Thanks, mate. That was helpful.