yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Yanchev:
Confirmed it is blocking several times more things. It blocks even in apps which never had anything. Are those domains legit trackers?
[Android Apps and Games] NeedleGames:
Omg this was the bug I was talking about. I have no idea why you see it because I have limited the url to be to two lines only and it got rid of the bug in my case. Do you see this on all packages or only the last one?

Yes. Some domains might accidentally get into the blocklist but unless the app works incorrectly, those internet calls are unnecessary and should be blocked.
[Android Apps and Games] StewMaker:
Hey are you procrastinating? You should be studying! :silly:

But thanks to you, mmoti, Mike and others for the continued updates. :good:
[Android Apps and Games] mmotti:
Those of you with DNS issues when setting Google as your custom DNS within SABS, I'd be interested to know whether this stops Netflix from working, too.

It is becoming clear that manipulating DNS, whether it be blocking it or forcing it to a desired address can cause issues.

I fear for some apps, forcing DNS through the firewall has the same consequences as blocking port 53 entirely.

In the long run, we either need to develop some kind of small whitelist for packages that can't have DNS forced (e.g. Play store, Netflix?) and process those accordingly, or we simply remove that option from the app.
[Android Apps and Games] Mike B.:
I just now ran a fresh compile (up to commit #480) and installed it on my N8 to show you. Look at the last URL. That files contains 2 entries but no number shows. Not a big deal.
[Android Apps and Games] Yanchev:
Question what is the correct input of an address in order to blacklist it? https://d270073ctm6rok.cloudfront.net/dist/2018/01/lucky-wheel/index.html?source=newyear_suspension is the link I am trying to block. Can get it to work.
[Android Apps and Games] Mike B.:
Yes, he can always procrastinate later! ;)
[Android Apps and Games] mmotti:
You have to be careful with these as multiple sites could be blocked from adding cloudfront entries.

You could try d270073ctm6rok.cloudfront.net to be on the safe(ish) side.
[Android Apps and Games] Mike B.:
You can only blacklist a domain, not a URL. In your example, you could blacklist "d270073ctm6rok.cloudfront.net" but it'd be pointless since that's a temporary address. If you blacklist cloudfront.net, then you won't be able to access anything using cloudfront. In other words, you can't block whatever that is you wanted from just using DNS/firewall, sorry.
[Android Apps and Games] 8139david:
What's the difference between https://github.com/LayoutXML/SABS/blob/master/standard-package.txt and https://github.com/LayoutXML/SABS/blob/master/standard-package-mmotti.txt, and which one should we use according to NeedleGames?
[Android Apps and Games] Mike B.:
It's simple, one is created by [MENTION=6150682]mmotti[/MENTION], the other is created by [MENTION=6183103]NeedleGames[/MENTION]. They are two very similar lists of potential ad servers. Use neither one, either one, or (with recent SABS versions) use both as they will be merged and duplicates removed.
[Android Apps and Games] 8139david:
So (modulo a few personal choices) the lists are basically equivalent?

PS: you have a way to answer questions which is rarely pleasant.
[Android Apps and Games] Mike B.:
They are different but have many entries in common. You don't need to guess, you can simply compare them yourself. Which one(s) you select is entirely up to you. It all depends on which sites and apps you use from which location and therefore which blocked domains are relevant to you. If you're not sure, use them both but don't loose sleep over this. Whatever you do, don't let anyone talk you into importing any of those useless huge lists (50K, 75K, even >100K entries!) found in some corner of the Internet.

PS: Your questions were actually already answered in this thread. Sometimes, it's easier and faster to read instead of asking... ;)
[Android Apps and Games] LegendM:
Thanks for response, I tried opendns and opennic dns (	ns1.any.dns.opennic.glue) but they didn't worked as well. I'm running CRB7 version of firmware on my S8 exynos. I seriously dont know whats wrong :eek:
[Android Apps and Games] pleasetouchmenot:
I'm using OpenDNS (208.67.222.222--208.67.220.220) and ComodoDNS (8.26.56.26--8.20.247.20) as sub (when i'm on gaming mode) and they're working perfectly fine. I think these DNS servers are the best combined with SABS. OpenNIC is okay too.
[Android Apps and Games] mmotti:
More changes to come to my host file.

It's been a difficult challenge to try and find an automated method to remove entries and replace with wildcards, although I believe I may have found a fairly fool proof solution with minimal fallout.

More to come soon, but a sneak peek:

Partial code output:

--> Processing adbrite.com
--> Adding: *.adbrite.com (-12 entries)
--> Host Count: 14220
--> Removed: 12
-----------------------
--> Processing oewabox.at
--> Adding: *.oewabox.at (-125 entries)
--> Host Count: 14096
--> Removed: 137
-----------------------
--> Processing 112.2o7.net
--> Adding: *.2o7.net (-379 entries)
--> Host Count: 13640
--> Removed: 516
-----------------------
--> Processing hitbox.com
--> Adding: *.hitbox.com (-360 entries)
--> Host Count: 13281
--> Removed: 876
-----------------------
--> Processing us.intellitxt.com
--> Adding: *.intellitxt.com (-81 entries)
--> Host Count: 13176
--> Removed: 957
-----------------------
--> Processing blogspot.com
--> Adding: *.blogspot.com (-20 entries)
--> Host Count: 13157
--> Removed: 977
-----------------------
--> Processing adtech.fr
--> Adding: *.adtech.fr (-65 entries)
--> Host Count: 13093
--> Removed: 1042
-----------------------
--> Processing adtech.us
--> Adding: *.adtech.us (-65 entries)
--> Host Count: 13029
--> Removed: 1107
-----------------------
--> Processing hit.gemius.pl
--> Adding: *.gemius.pl (-22 entries)
--> Host Count: 13008
--> Removed: 1129
-----------------------
--> Processing doubleclick.net
--> Adding: *.doubleclick.net (-100 entries)
--> Host Count: 12909
--> Removed: 1229
-----------------------
[Android Apps and Games] android_htc:
I am also using the S8 exynos in the UK and setting custom DNS blocks play store downloads. From some previous reports, Note 8 users do not seem to have this issue...not sure if they are using exynos or snapdragon version.
[Android Apps and Games] xxx_guacamole_xxx:
Help!!!!

After changing the package name in build.gradle, there is no alert prompting a sync. Shift+F10 does nothing for me. I tried on my phone already with Editor, but it kept saying problem parsing package. Please help!!!
[Android Apps and Games] khaisttj92:
here i compile it.change the package name.

https://drive.google.com/file/d/1X9NnO0IGK2163mF_iPDyc2F_mcipSTID/view?usp=drivesdk
[Android Apps and Games] Bobthahog:
I just built my own version, with most recent commits, using android studio. Wasn't difficult at all.
[Android Apps and Games] pleasetouchmenot:
Is that the most recent commits on git?
[Android Apps and Games] khaisttj92:
yes
[Android Apps and Games] Yanchev:
[MENTION=6183103]NeedleGames[/MENTION] there is a problem with the update of your host list. It blocks Google images search. Tried it with only [MENTION=7539469]mmoti[/MENTION]'s list and it works normally.
[Android Apps and Games] sanderg:
SABS not blocking

Galaxy S8 with Oreo

- Replaced Adhell2 with SABS, compiled myself

- Reused KNOX key, SABS activates fine

- Used the lists from post #8, then discovered SABS would not enable anymore

- Thought the KNOX key was to blame so revoked and reissued it, pasted it in the About dialog in SABS, the Submit key button does not give any response however

- Removed the huge list from #8, SABS now says it is enabled

- It does not block anything however

How could I fix this?
[Android Apps and Games] NeedleGames:
I though I had removed the domain. Now I really did.

I suspect this is a UI bug. Wait for an update which will be available soon
[Android Apps and Games] sanderg:
Export option

[MENTION=6183103]NeedleGames[/MENTION] I'd also appreciate an import/export option for my custom block list.

I have used my pi-hole to remove additional tracking and adservers and typing these by hand is not my favorite job ;)
[Android Apps and Games] mmotti:
Do you mean an import for a locally stored block list? You can already import your own block list.

All you need to do is save it on your phone somewhere and then copy / paste the path into SABS.
[Android Apps and Games] 8139david:
Selective synchronization

On the Galaxy S8+, I'd like to synchronize only selected accounts, and I wonder if SABS, now or in a later incarnation, could help me do that.

In fact, the only account I want synchronize is Firefox. I want all other accounts (including Google and Samsung) to be NOT synchronized.

My solution currently is to disable automatic synchronization, and manually synchronize Firefox when I think about it (for bookmarks).

It would be simpler if I could set automatic synchronization for Firefox, while disabling it for the other apps. (More generally, it would be nice to be able to chose what one synchronizes automatically on a given app. Most apps don't offer this choice.)

Is that something SABS can or could do in the future?
[Android Apps and Games] mmotti:
Host file update

Hi All,

Big host file update today - Over 1,000 domains removed with the use of wildcards.

Current count: 8496

How can I obtain this host file?

If you are on the latest version of SABS, it should be visible under Settings -> Manage blocked domains -> Subscribe to providers (mmotti's package).

No pun intended.

The following wildcards are now utilised:

*.247realmedia.com

*.2mdn.net

*.2o7.net

*.adbureau.net

*.addthis.com

*.admob.com

*.adscience.nl

*.adserver.com

*.adtech.de

*.adtech.fr

*.adtech.us

*.advance.net

*.advertising.com

*.am15.net

*.amazon-adsystem.com

*.baidu.com

*.bbelements.com

*.bravenet.com

*.casalemedia.com

*.checkm8.com

*.cjt1.net

*.crashlytics.com

*.doubleclick.net

*.esomniture.com

*.extreme-dm.com

*.fastclick.net

*.focalink.com

*.gemius.pl

*.googlezip.net

*.hitbox.com

*.hut1.ru

*.hyperbanner.net

*.imrworldwide.com

*.intellitxt.com

*.oewabox.at

*.omtrdc.net

*.p2l.info

*.petrovka.info

*.polybuild.ru

*.sextracker.com

*.shengen.ru

*.sitemeter.com

*.spylog.com

*.startappnetwork.com

*.startappservice.com

*.thruport.com

*.tradedoubler.com

*.tsyndicate.com

*.xcounter.com

*.xiti.com

*.yimg.com

*.zedo.com

ad.*

ad2.*

ads.*

ads1.*

ads2.*

adserver.*

adv.*

affiliate.*

banner.*

banners.*

counter.*

gcirm.*

graph.facebook.com

metrics.*

oas.*

oascentral.*

phorm.*

protection.*

scrooge.*

stat.*

stats.*

track.*

tracker.*

tracking.*
[Android Apps and Games] ewokuk:
mmotti's package is shrinking! call a doctor!

539 blocked in last 24 hours for me, almost all crashlytics and google-analytics. I am wondering if there is an effect on battery life with these things being blocked. not due to sabs, but due to the apps possibly re-trying these connections due to the failures, resulting in the phone spending less time in deep sleep? They are coming up every few minutes and I assume the phone is waking up to attempt these connections? clearly battery life is fine and may be worse if they weren't blocked as they would then be transmitting data as well, just curious as to how much battery life is possibly being wasted but these apps constantly doing this crap.
[Android Apps and Games] mata77:
mmotti's package is also this link https://goo.gl/GbSyNf? Wirh this i have 9605 entry. it's correct?
[Android Apps and Games] mmotti:
That's the old version. The new version is contained within SABS.
[Android Apps and Games] sanderg:
I tried to find it but am unable to do so.

Also how would I be able to export the current list of individual hosts?

It would be great if an export function saves the custom hosts file (or the entire SABS config) to a file, and an import function either has a browse button, or can detect available backups.
[Android Apps and Games] frezd91:
I'd like just to block ads for Chrome and a couple of apps, so I have turned off blocking for all the others. Why I still see that it's blocking activity from apps like PayPal or Evernote?
[Android Apps and Games] mata77:
Uhm, i have 0.7 version of Sabs, and have only standard package
[Android Apps and Games] mmotti:
Perhaps it was in a commit after the most recent release.

You can find it here: https://raw.githubusercontent.com/LayoutXML/SABS/master/standard-package-mmotti.txt

:)
[Android Apps and Games] :
I have an advertisement in an app. In my rooted tablet with adaway i don't have it. Is there a way to add adaway provider?

I added https://adaway.org/hosts.txt

It shows it found 526, but i still have advertisement to this app..
[Android Apps and Games] Mike B.:
[MENTION=6183103]NeedleGames[/MENTION]: there is some confusion among users between the precompiled apks that you regularly release and versions compiled from the latest source. It might be useful to make the versionName more specific. For example, releasing "0.0.7(476)" while still keeping the versionNumber of "7" would allow us to know that the user doesn't have the latest enhancements if the source now has 483 commits. You'd be effectively using the number of commits as the "build number". Since you show both Name and Number in the About dialog, that information would be easy to get for anyone.
[Android Apps and Games] treezy26:
Can this be used with the standard package? Or is it best to just use one or the other?
[Android Apps and Games] Mike B.:
If you're running AdAway on another device, you can use that to find out which specific host is serving the ads you don't want (refer to your AdAway documentation for "Log DNS Requests"). Once you know that domain, you can simply blacklist it in SABS on your phone.

No need to add the entire old AdAway hosts.txt to SABS since its entries are already merged into the current standard packages.

---------- Post added at 07:48 AM ---------- Previous post was at 07:47 AM ----------

Asked and answered many times! ;)

Use either one, none, or both. They are merged by SABS and duplicates removed.
[Android Apps and Games] treezy26:
---------- Post added at 07:48 AM ---------- Previous post was at 07:47 AM ----------

Asked and answered many times! ;)

Use either one, none, or both. They are merged by SABS and duplicates removed.[/QUOTE]

Forgive me but I came here to originally ask how to use your hosts files but I figured it out. Once I did, 8 got overwhelmed and tend to ask dumb questions lol

And FYI...idk what I'd do without SABS. Didn't want to root my phone just to block ads and this works perfectly. Now if I can only figure out why this one app I use throws an ad in my face every now and then, I'd be set. Thanks again for all you guys' work in this.??
[Android Apps and Games] NeedleGames:
You have the latest apk release but not the latest version (commit-wise). Just wait a couple of days while I add the final touches and then you will have the version with latest commits.

It's samsung's knox's fault. Nothing I can do.

That's a great idea.
[Android Apps and Games] Mike B.:
Remember that SABS, like any DNS/hosts based method, can only block domains accessed by name from an application. Some apps are clever/devious enough to use a domain's numeric IP, an embedded script, internal links, etc. Fortunately, there is often another app with the same basic functionality but fewer ads.

---------- Post added at 08:07 AM ---------- Previous post was at 08:02 AM ----------

I'm allowed one of those once in a while, but I might have reached my quota for 2018 already! ;)

It's actually a scheme I adopted eons ago for some of my own projects. As you know, versionNumber must be an integer, but versionName is freeform so might as well use it for something useful.
[Android Apps and Games] orbitalcomp:
Thanks for that link, it helps those of us not compiling our own versions to at least stay current on the upgraded hosts files. I was using your original linked host file from before you integrated with SABS.

I went ahead and also used that same link to add the latest standard package, which is probably the same as just refreshing, but noticed that it overwrote the built in host file with the same name (of course) but now has the option to delete unlike the original.
[Android Apps and Games] mmotti:
Actually... I hate to be thaaattt guy but now that the host files are so different, it's probably better to use one or the other. Not that it does any harm, but I do not believe it will be as effective at selection unique domains at the moment.

As an example, [MENTION=6183103]NeedleGames[/MENTION]'s host may include many entries for affilliates.xyz.com, whereas mine has a simple affilliates.* now, so you'll be doubling up on hosts that you do not need.

Strictly speaking - No harm done, but just means for longer activation times than necessary, really... unless of course you hit the error limit and everything explodes :P
[Android Apps and Games] fusionjack:
[MENTION=6150682]mmotti[/MENTION], i almost overseen your post.

no, i never use it.

yes, you can get the content of the file from a uri like i did in this following commit:

https://github.com/fusionjack/Adhell2/commit/0c322a3e622ea8ff7928a91f5dbc94654c989398

see changes on BlockUrlUtil.java

i chose to use file url to address a local host file so that it can be validated easily with android's URLUtil class without defining any regex. i also think this should be the right approach because the previous one is already a type of url: http url. if in future, we want to support host file on ftp, this should be easy to extend as it is also a form of url.

to get path on internal or external storage, it is better to use API because they could be device or android version dependent.

"sdcard" doesn't give guarantee that it always points to the internal storage.

there is a tutorial how to find file path for internal/external storage by using API:

https://developer.android.com/training/data-storage/files.html

but...since the file path needs to be defined manually, you don't need to bother to find the path with the API.

the file chooser should be the right approach if you want to make it user friendly.
[Android Apps and Games] Mike B.:
Indeed, no harm done and for some users it might be easier to enable them both. Clearly, the better the "discrete-to-wildcard" processing gets, the smaller the end result will be. The current combination still "only" ends up creating a 10K list, way larger than necessary but I've given up on trying to convince people that they only need a MUCH smaller file.

For fun(?) you should try to use your phone normally for a day or so, then see how many hosts are actually blocked. Once reduced to wildcards where applicable, that number will be shockingly tiny. I dare you to share your results publicly! ;) There's no way in (Ad)Hell anybody would need to block 10K hosts, but I suppose some users believe that bigger is better.
[Android Apps and Games] mmotti:
Size doesn't matter! ;) and on the subject of that, after a couple of attempts due to breaking and not realizing until after uploading, I have shaved another 584 domains from the list. Will be interested to know if any legitimate sites are blocked - I did my best to look through to take out any obvious false positives.

I CAN'T DO IT haha I love ad-blocking too much. It may surprise you, but I don't generally use SABS other than for development purposes. I have a Pi-Hole and OpenVPN setup @ home with 140,000 domains blocked (has to be a larger number as it doesn't support wildcards as well as SABS). No slow downs, no hassle, pretty seamless :) I only make the effort with this so others can enjoy the ad free experience lol.
[Android Apps and Games] StewMaker:
ebay images won't load for me again. I see *yimg.com in standard-package.txt. Is it needed when we have *.yimg.com already?

EDIT: Huh, weird. I tried to whitelist ebayimg.com and i.ebayimg.com (turned SABS off and on) and I still can't see images. I'll just turn off adblocking in the ebay app until I figure this out.
[Android Apps and Games] Mike B.:
I believe the technical term for that is "cop out"! I'm sure your Pi toy can tell you what you actually block. Don't be shy, fess up (the English/US colloquial, not the French word), you just don't want the humiliation of telling us! ;)

You love ad blocking. Me, I hate ads. You block 140K domains. I only use the standard package + your list for testing ,but in real life my Knox/SABS blocklist has 132 lines.

Folks, seriously, you DO NOT need to waste lots of time trying to block every host name that can be possibly blocked. Concentrate on what YOU need and don't assume that anybody else knows what is relevant to YOU. It's a lot simpler than you might think.
[Android Apps and Games] mmotti:
Try to whitelist *yimg.com

It's probably an oversight. Easily done with wild cards.
[Android Apps and Games] StewMaker:
Oh, I didn't know you could whitelist wildcards. The text on the whitelist screen says you can't still. It does work though. Thanks! :D
[Android Apps and Games] mmotti:
Hahaha I could tell you exactly what gets blocked, but it's much more fun to leave you guessing :silly:

You can see some data in the image attached. I've not been browsing as such today. When I am, it reaches literally 50% of my traffic being blocked over the course of the last 48 hours.

Another things it's excellent for is catching DNS requests by apps. Showbox for example I tried packet logging, no root firewall etc looking at all the connections, nothing. I login to pihole after firing up the app and there are the ad servers clear as day :)
[Android Apps and Games] mmotti:
I can't remember what commit that was but I think [MENTION=6183103]NeedleGames[/MENTION] implemented that one :)
[Android Apps and Games] Mike B.:
50% blocked but can your Pi tell you which ones among the 140K instead of just a number?
[Android Apps and Games] mmotti:
Thanks, mate. I hadn't actually thought of using the built in pattern matchers. They weren't implemented or suitable for some areas of this app but would likely be perfect for this.

Yes - Need to do some experimenting with the API but without an SD card right now it's difficult to look further into. The getexternalstoragedirectory still seemed to point to internal.

The file chooser would be perfect - Just a little daunting lol.
[Android Apps and Games] mmotti:
Sure can.

You can see live(ish) updates and historic data. My lots reflush daily and don't get added to the local database for privacy reasons, but I get a decent overview for what I need.

You can view / search the query log and filter by client etc.
[Android Apps and Games] Mike B.:
Great! According to your screenshot, the first 10 entries account for 908 out of 2605 "rejections". It's possible that a few of the other 139,990 domains don't need to be blacklisted at all.
[Android Apps and Games] mmotti:
Well I walked right into that one
[Android Apps and Games] NeedleGames:
You can now donate!

On Google Play or on PayPal.

(If you have a revolut account you can also donate tax free! Send me a private message for that)
[Android Apps and Games] NeedleGames:
[MENTION=6150682]mmotti[/MENTION] you may want to remove s.youtube.com from your blocklist because it's the domain that is used to add videos to watch history on youtube. And knowing that ads are not blocked on this app/site there is no reason to block it in the first place.
[Android Apps and Games] mmotti:
Ah, of course. I must have forgot about that one after starting a fresh. Thanks for the reminder!
[Android Apps and Games] NeedleGames:
I think it should work as if there was no internet connection - if internet is unavailable then apps aren't constantly trying to communicate.
[Android Apps and Games] uoY_redruM:
Anyone know what Samsung Health is trying to push through? I noticed it's blocked a lot in SABS and I literally don't open or use it at all...

EDIT- Samsung+ not Samsung Health, sorry.