yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] guest4711:
The webserver will still require root as long as it is running on privileged ports (ports < 4096 e.g. http (80) and https (443))...

This could be solved by redirecting a request to localhost:8000 instead of localhost. In this case the given target port has to ignored... (la.la will be redirected to localhost:8000, la.la:443 to localhost:8000 too).
[Android Apps and Games] NYLimited:
Ahh.. yes. Didn't think about that as I never use the web server part... :cool:
[Android Apps and Games] Zgadnijcie:
[MENTION=2822685]PerfectSlayer[/MENTION] could you add option to make backup and restore hosts sources like it is possible in white and black list?

Regards!

Wysłane z mojego Redmi Note 4 przy użyciu Tapatalka
[Android Apps and Games] martyfender:
Could you please add: sbc.io/hosts/hosts as one of the default lists? If there is a good reason not to, let me know. I have seen this posted many times to use this instead of the defaults. I have been using it for some time, instead of the defaults.

Thanks
[Android Apps and Games] DiamondJohn:
I have no problem with providing root, and I do not use systemless hosts, and actually have never used the web server. However, just thinking out-loud, could you deny the suoeruser request, and the single feature that requires root simply not work, while the rest of the functionality, not requiring root, still function as expected?:confused:

---------- Post added at 09:39 AM ---------- Previous post was at 09:33 AM ----------

The top of the file you linked has "Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts". So if anything, wouldn't you want the latest?

I personally have a boot script (which I transfer/restore between phones/upgrades) which automates the re-instatement of a huge list of hosts so that I do not rely on the defaults. My list already has the StevenBlack included automatically, so a very short list as the default seems appropriate; but thats just me.;)
[Android Apps and Games] NYLimited:
Of course. And it does not actually matter. I simply thought it was an unused/unneeded few lines of code. No biggie here. ;)
[Android Apps and Games] uaevuon:
Enable systemless mode does not work after update to 3.3 with magisk.

It worked in 3.2.
[Android Apps and Games] Ja_som:
Enable Systemless hosts in Magisk Manager
[Android Apps and Games] martyfender:
Here are a few posts why one should use the sbc.io/hosts/hosts:

"Steve Black's downloads can be problematic direct from github. Try http://sbc.io/hosts/hosts instead. "

"stevenblack host works well for me. i use it in place of the 3 default hosts. faster than the 3 default hosts and just as good (if not better) ad blocking.

https://raw.githubusercontent.com/St...s/master/hosts

http://sbc.io/hosts/hosts - stevenblack mirror (in case you want to see online and local dates... the host file above shows "n/a" for both dates... for me at least)"

"For whatever reason using https://raw.githubusercontent.com/st...s/master/hosts and changing it to http instead of https didn't work for me. Says "local: n/a online: n/a" whereas using http://sbc.io/hosts/hosts works perfect. "

So it is a matter of offline, online dates showing vs. n/a. I haven't tried https://raw.githubusercontent.com/st...s/master/hosts recently to know if it now works correctly. sbc.io/host/hosts alway works so that is why I use it.

---------- Post added at 12:25 PM ---------- Previous post was at 12:09 PM ----------

The systemless button will still be greyed out in adaway, but with the above setting in Magisk Manager, it is handled by Magisk, instead and works.
[Android Apps and Games] githyanki:
Can we get a bot to answer this question? It is sad how often it gets asked.
[Android Apps and Games] Pkt_Lnt:
99.9% of questions on XDA could be answered by bots with the answer already give 100000000 times. :cyclops:
[Android Apps and Games] Badger50:
Then we'd have nothing to do! ??
[Android Apps and Games] DiamondJohn:
We basically already do, its called "search". And to be clear, I personally haven't always used it as my first port of call.:o
[Android Apps and Games] uaevuon:
Of course I did. But not working.
[Android Apps and Games] prathu30:
If systemless enabled in magisk then it works. Its just that adaway doesn't shows it (greyed out and unchecked in adaway)
[Android Apps and Games] nextheart:
Original size of my hosts file is 6.8 Mb. When I download all hosts files and apply in AdAway. It should be merged. But after rebooting device, hosts file size is only 182 Kb. How is it happening? Can someone please explain what's wrong? Thank you.
[Android Apps and Games] guest4711:
The files from the host sources you selected in AdAway are merged together. The merged file overwrites your old hostfile (the changes are not merged with your old file)...

It seems for me that some of your sources could not be reached so the resulting file is very small.
[Android Apps and Games] nextheart:
Thank you for your kind reply, I thought it should append with my old host file.
[Android Apps and Games] guest4711:
There is a feature called blacklist for this purpose. Your blacklist is merged in... (If you want to include your old file you may import it using the import feature or as a local hostsource. Both should be a little bit tricky.)
[Android Apps and Games] nextheart:
Yes, I just learned it, thank you for pointing.
[Android Apps and Games] DiamondJohn:
A new feature request which would alleviate the above, that I think would make a REALLY good addition, is a fail over to the last known good file, for any specific host source download failure.:fingers-crossed::fingers-crossed::fingers-crossed:

So, for example, if you have 3 host sources, and the second one fails, it would take the previous days version of host file 2, and combine it with the new host file 1 and 3, instead of only being new host files 1 & 3 it would be "new 1" + "yesterdays 2" + "new 3". In the above case it could make the difference between 0.182MB and 6.8MB.:eek: I personally have one hostfile which fails more often than not, and consciously have files that cross-over/duplicate, to hopefully help cover any individual host file failure.

And just to state the obvious, once imported, this forms a static list, not an ever updating list using your previous days result. So, from that, make sure to use a file generated with all your host sources, not from one that had failed sources.:rolleyes:

On a slight tangent, I am guessing there would be some kind of local mini web server in one of the app markets, that may allow you to serve up your current host file as a web page, and then add this page as a host file source, and thus it would be merged every time creating a cumulative host file. Although, if someone is removing a specific host from the supplied host file, there is probably a reason. It was just a random thought.;) And it would also help alleviate the above issue if a single (or even multiple) host source fails.:confused:
[Android Apps and Games] ktmom:
How about just not completing the update if a source fails with a notification. What your proposing would use storage space to keep rolling sources and seems overkill to me. Honestly, I update my singular source when I think about it. Weekly would be really frequent [emoji39]

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android Apps and Games] DiamondJohn:
As I said above, I have at least one file that fails regularily. So, not updating the host file on a single failure, would possible have my host file never to get updated.:crying: Especially if I was to boot my phone every day in a bad WiFi area.

The storage space would only logically be a little more than the size of a host file (ie <10MB for the example above, if you don't have too many duplicates between host sources:rolleyes:), which with the Gigabytes available, its not really material to most. Also, this data would sit on the data partition at worst, and could also be aimed for the SDCard. I have a 64GB external SDCard, so the space is far from my issue.

The app has an automatic daily/startup update feature, which I personally use. And hence, If one fails, that day (or possibly any or all following days) will be stale. If one of your host sources just stops/breaks, you will be stuck with a truly ageing hosts file.:mad:

As for the period of updates, I know of at least one of my apps that I use regularly that often needs an intra-day update to catch new ads. A weekly update schedule would not work for me personally, and I prefer not to have to manually intervene to keep it updated; so the boot up update is turned on, and hence any failures on boot leave me "vulnerable" (NB: I have ads and malware blocks).
[Android Apps and Games] ogisha:
I have one question.

Does AdAway when merging host files delete duplicate entries?

There are probably many duplicate hosts in different sources and sometimes in the same, too.

Thank you.
[Android Apps and Games] guest4711:
Yes, it does.
[Android Apps and Games] Ultramanoid:
Yes.
[Android Apps and Games] DiamondJohn:
Kinda skipped over this statement, and realised you may of misunderstood what I was proposing. I am NOT suggesting a full rolling history be kept, but only a copy of the last known successful download of each hostfile. And if a failure occurs, it would fall back to use this cached copy instead of a blank/empty file. And when it succeeds, it would overwrite the previous cached copy of that specific host file.

Now, if you only have a single host source, and only update it less than weekly, then if you have a failure on this single source, you would basically go about without any host filtering. At least under my proposal, you would have the full host file, but simply a week stale.

Also, come to think of it, if you only have a single host source, chances are the cached host file space shouldn't be an issue ie space wouldnt be an issue considering the added security of never being completely unprotected. AND this extra space is most likely used temporarily between downloading and merging the file anyway.
[Android Apps and Games] Domino5:
Hello i have problems with AdAway some sites doesnt load with battery saver enabled and background data option disabled. Is there any way to fix that wihout enabling background data cos it drains battery too much. In past i was using AdGuard and it was blocking ads successfully with disabled background data but only in browsers (paid version blocks everywhere). My device is Samsung S7 G930F Nougat 7.0

PS. I recommend everyone to delete 3 default host sources and add that one http://1hosts.cf/ it contains those 3 and much more.
[Android Apps and Games] DEVILOPS 007:
Steven black host file blocks more domains apparently according to the website. Also, for your problem, you could use puffin browser. Ads will get through as it is more like a server than a browser but it will allow you to load these websites without disabling adaway.
[Android Apps and Games] Domino5:
I know other browsers with included ad blocking solution will work. I'm using now Samsung Internet Browser with AdGuard Content blocker but i would like to use Chrome as i got usede to it. Thanks for response anyway :highfive:

EDIT: Those Steven black host are much better contains over 1500 entries for polish ads Thanks
[Android Apps and Games] DiamondJohn:
I wouldn't be so quick. I purposefully have duplications/crossovers in my list, as sometimes I may get a random failure for a specific host source, and the resultant host file would be lacking. By having the duplication, if one source fails (for example http://1hosts.cf/), the duplication of having https://adaway.org/hosts.txt as its own explicit host source, will cover the missing entries.

As I turn my phone on (with auto update) in the morning within WiFi, with a decent phone, while I get ready for work or going out, its all done before I leave my home. My WiFI where I turn my phone on is not the best reception, so probably aggravates the possibility of a failure:mad:

In short, I have all the defaults, as well as http://1hosts.cf/:good:
[Android Apps and Games] Domino5:
Just find out that adaway deletes duplicated hosts inside file so you are right better to leave default sources.
[Android Apps and Games] DiamondJohn:
oh, and I forgot, another feature which could "piggy-back" off of keeping a history of the last known good download is that currently, when AdAway checks for updates, if one single file is updated, AdAway has to download each and every individual host file again. If a copy of the last known good download of each file is kept, then only the single changed file would need to be downloaded and then merged with all the other last known good downloads of the other files, instead of every file needing to be downloaded again. This feature could make a very material difference if the file that constantly changes is tiny, while a relatively static host source is very large.
[Android Apps and Games] billa:
You may try a good wake-lock app to elevate AdAway to high priority, and no sleep... it might work even with background data off.

Unfortunately Android OS controls most of the background data activity, so you may not have a fine-grain control over it.

Another workaround would be to turn background data on, and set most/all of your normally running apps to prevent using background data with the exception of AdAway perhaps. Let us know if you've found a working solution
[Android Apps and Games] Steelwall:
I'm sorry if this is not the right place to ask since it's not directly related to AdAway, but how do I go about achieving what AdAway does on my own? What I tried was first mounting the system partition in TWRP, then with the TWRP's own file manager I replaced the original hosts file in system/etc with a modified one that should block ads (I made sure the new one is hosts and not hosts.txt). Then I rebooted a couple of times but ads are still there. What am I missing?
[Android Apps and Games] guest4711:
Make sure,

1. you did disable proxy server in APN settings (in phone settings - Mobile networks),

2. you did disable Chrome data compression (Reduce data usage under Bandwidth settings),

3. you are not using any VPN to connect to the internet.

Any of this cases circumvents the usage of your host file. You may check if your host file is used by pinging a blocked host using the terminal. If the response is like "pinging bad.host.domain (127.0.0.1)" all should be ok, but if you get a regular ip-address in the answer that host is not blocked.
[Android Apps and Games] DiamondJohn:
check the file ownership and permissions. Also check that when in the ROM, the hosts file contains exactly what you expected.
[Android Apps and Games] jcmm11:
Just FYI - using Wireguard for a VPN doesn't circumvent the hosts file.
[Android Apps and Games] Steelwall:
I actually got it working. What I did was in the rom I enabled root via ADB and used ADB on my computer to pull the old hosts file out and pushed the new one in and now it works. Honestly I have no idea what's the difference between the ADB method and what I tried earlier.
[Android Apps and Games] DiamondJohn:
default permissions applied when copied using TWRP, are different to most other methods; I get different results from different file managers/root explorers. Although I wont say its 100%, it sounds like it to me. You can check it yourself by trying it all again, now that you know how to make it work.
[Android Apps and Games] ab1jx:
If I put AdAway on the phone that's my internet access point and disable the APN proxy will every machine connected through the wifi hotspot be ad-filtered as well? Seems like it should work.

Since the wifi hotspot serves as the DNS server for the machines connected through it, its hosts file becomes everybody's hosts file. If I do an nslookup on a Linux box connected the DNS server mentioned is the phone's IP address of 192.168.43.1
[Android Apps and Games] billa:
Like another user said, most likely the difference is in the permissions... with a file manager you can try setting it to 644 or 777, then it should work.

Not sure if group/ownership matters or not...

Really good question... well there's one way to find out, try it, and let us know.

I have a question too... is AdAway running its own proxy server or just uses the built in one?

If own server, is it possible to point the APN proxy:port to this server?

Thanks.
[Android Apps and Games] Azazello:
How to flush/clear the lists - both black and white

Guyz, I did search but maybe my search-fu isn't working right... Is it possible to flush/clear (both black and white) lists automatically, or

overwrite

them with new lists? Instead of deleting entries one-by-one?

I'm using an older version, 3.1, so maybe this feature has been added since then.
[Android Apps and Games] DiamondJohn:
Although a little heavy handed, wiping the app data will get you back to a clear list pretty quick.
[Android Apps and Games] ab1jx:
Yes, it seems to work like I thought. I swapped in my rooted phone with Adaway, turned on the hotspot. On my Raspberry Pi I typed in the URL ads.google.com since it was the only one I could think of at the time. I ended up at the Pi's webserver, Apache, which is 127.0.0.1 or localhost. This is connecting over WiFi.

But I have trouble getting back to this thread. I can get to gmail, Facebook, BBC. I think it's because this site is trying to sell subscriptions. I turned off Adaway, rebooted the phone, closed the browser window and reopened. I'm now on the unrooted phone without Adaway, that still didn't work. This thread starts to show then the page refreshes to a blank one. I'm in Chrome now instead of Firefox, maybe there's some cookie set in Firefox I need to dump.

Interesting security observation here, I can swap my 2 phones, both with the same hotspot/AP name and the Pi at least doesn't know the difference. So it's possible to impersonate an AP. The fake AP of course could have a hosts file that redirects somewhere bogus, or it could be logging keystrokes, anything. I expected the MAC address would get checked but no. I'm not using a password on this AP though, it's open, don't need one.

I'm off to root the other phone, don't know when this site will let me back on.
[Android Apps and Games] Luniz2k1:
No, this is an issue with ads on XDA. I saw this issue at work yesterday where the page would go all white after loading.
[Android Apps and Games] ab1jx:
Ooops

Now Firefox works again.

But on my 2nd phone I'm trying to root I keep getting stuck in the mode with the dead robot and the asterisk, I forget what that means. I got it once and flashed TWRP again. I didn't have a SuperSU on the phone so I waited until I had ES File Explorer to ftp one on there, now I'm trying to boot back into TWRP recovery mode to flash the SuperSU zip. Except I keep getting the dead robot. I can't do it from fastboot by any chance?

Doesn't matter if I get there by holding buttons while I boot the phone or doing adb reboot recovery, I end up in the same place.

"You are in a maze of twisty passages, all alike"
[Android Apps and Games] KOLIOSIS:
Your issue seems totally unrelated to the topic here.

You're better served asking these questions in the forum/section specific to your device.
[Android Apps and Games] ab1jx:
I got it, AdAway's all installed. This is on my original Motorola XT1527 which is coming unglued BTW. The 2nd one is a spare, now they both have AdAway so my internet connection is ad-filtered and I have a backup.
[Android Apps and Games] carlese:
Hi guys, how do I block the annoying pages that pop up whenever I try to watch something on streaming sites?
[Android Apps and Games] guest4711:
Did you try to follow the instructions given in the FAQ?
[Android Apps and Games] carlese:
I will try this, these are really bad pop ups, won't go away even if I click back and the only way is to force close the browser..
[Android Apps and Games] carlese:
Hi, I tried to apply this list for popup ads:

https://raw.githubusercontent.com/Yhonay/antipopads/master/popads.txt

But the format looks strange to me and if I check in the hosts file i cannot find the entries.. Should I do something?
[Android Apps and Games] ktmom:
That hosts list is for AdBlock Plus and is not properly formatted for Adaway. Compare a few entries from your list to a few from a list designed for Adaway;

[Adblock Plus 2.0]
! Version: 5371
! Title: Anti popads.net
! Licence: WTFPL version 2
! Homepage: https://github.com/Yhonay/antipopads
! Title: Anti popads.net
! Expires: 1 hour
||aaeqlxdgx.bid^
||aajychvi.bid^
||aanvxbvkdxph.com^
||aaomstbnbiqo.com^

# Hosts contributed by Steven Black
# http://stevenblack.com
127.0.0.1 1493361689.rsc.cdn77.org
127.0.0.1 30-day-change.com
127.0.0.1 2468.go2cloud.org
127.0.0.1 adsmws.cloudapp.net
127.0.0.1 androidads23.adcolony.com

If you really want that list, you could manually modify the AdBlock Plus to look like the 2nd list (Steven Black's) to make it work.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android Apps and Games] carlese:
This looks good:

https://github.com/Yhonay/antipopads/blob/master/hosts

But I don't see any changes also with this..
[Android Apps and Games] guest4711:
Try this url. AdAway does not like downloading from github...

https://raw.githubusercontent.com/Yhonay/antipopads/blob/master/hosts

Edit: Seems not to work. But perhaps you'll find another mirror.

Compare the size of your hostfile before and after applying this source to see whether it inserted some targets for blocking...
[Android Apps and Games] ktmom:
I use the Steven black list from github without problems. You must find lists designed for Adaway as I posted earlier.

"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
[Android Apps and Games] carlese:
I use Steven black as well but maybe that other list can solve my pop up problems.. Unfortunately I can't find an adaway compatible list..
[Android Apps and Games] jcmm11:
Actually it seems AdAway doesn't like downloading from https. Try using just http
[Android Apps and Games] carlese:
Not working.. Could you check if it works for you? It says. Successful but can't find any record. In my hosts file..
[Android Apps and Games] DiamondJohn:
I have a few lists from Github.

Although I have not explicitly tested the following link in AdAway, I don't see why the following would not work.

https://raw.githubusercontent.com/Yhonay/antipopads/master/hosts

---------- Post added at 11:57 PM ---------- Previous post was at 11:52 PM ----------

I have another app that uses a pop-up on exit. AdAway does not stop the pop-window appearing, however the web page it attempts to display, shows it could not reach the ad. ie the pop-up remains, but it is basically a failed web page displayed.
[Android Apps and Games] carlese:
This list worked fine, many thanks! I'm OK with the popup not reaching the page, it's really annoying that sometimes you can't even close the page!
[Android Apps and Games] Shtiff1:
I've tried a couple from Steven blacks page, but every time it updates it doesn't, saying offline. Could you provide your Steven black link for your host files to see if I can get it to work?
[Android Apps and Games] badmojr:
http://sbc.io/hosts/hosts

Check this one out, too => http://1hosts.cf
[Android Apps and Games] Shtiff1:
Thank you

---------- Post added at 09:45 PM ---------- Previous post was at 09:42 PM ----------

Yes already have 1host.cf

It's working now, thanks again
[Android Apps and Games] geokilla:
I installed the app, linked it to Steven Black's host files, but ads are not being blocked on my OnePlus 5T running LineageOS 8.1 with Magisk for root. Could there be something wrong in my settings?
[Android Apps and Games] valkyrjur:
Did you toggle on systemless hosts in magisk settings?
[Android Apps and Games] geokilla:
Yes I did. The same setting however is greyed out in AdAway.
[Android Apps and Games] DiamondJohn:
Just like the one you liked, its also a join of multiple host files as well as crowd sourcing. Read the text at: https://github.com/StevenBlack/hosts