yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Mike B.:
But then apps that require access to garbage.facebook.com ads will complain, as some users have told us. Am I evil because I enjoy watching FB users struggle with those impossible choices? ;)

---------- Post added at 12:03 PM ---------- Previous post was at 12:01 PM ----------

A warning that some of those subdomains are merely temporary addresses that change constantly.
[Android Apps and Games] mmotti:
I can't stand it and I face no end of "why aren't you on Facebook?" as if it's a crime to humanity to not be actively airing my dirty laundry for all to read or posting statuses begging for attention lol.

We need to find an appropriate work around though as this is the way it's going to be going forward as the ad providers get smarter. App specific whitelist entries could work but how much development time that is I don't know - I don't do UI stuff lol.
[Android Apps and Games] Mike B.:
Actually, I DO have an ancient FB account but it was created before FB even became public and way before they forced you to use full data, so it's just an empty account using a simple handle, with no data, but enough to view other people's accounts if needed.

If ad peddlers were a bit smarter, they'd simply use IPs instead of relying on DNS, but their best bet is the YouTube approach: embed the material seamlessly inside other content so that there's no objective way to separate the two, akin to product placement in movies and TV shows (e.g. the camera happens to zoom in on the can of Coca Cola that the star holds during a crucial scene). If users were a bit smarter they'd simply quit using anything that serves material they don't like.

Realistically there's nothing SABS as a Knox firewall front end can do. Users who need that functionality would be best advised to look at other tools such as "element blockers" that don't block anything but at least hide the unwanted material. Adding that to SABS would surely kill the project quickly, as it has done with other hosts-based "blockers". Remember,

keep it simple!

;)
[Android Apps and Games] mmotti:
SPONSORED! :p
[Android Apps and Games] Mike B.:
From the Oxford Dictionary:

An ad by any other name would smell just as bad! (paraphrasing Billy S.)

BTW, since nobody can access my FB account, I'm posting here that I'm having a cup of coffee. Feel free to "like" that important announcement.

This message was brought to you thanks to financial support from the San Francisco Bay gourmet coffees company.

HAHA! You didn't block it, my ad got through, I win! ;)

Stupid post, I know, just as stupid as all that garbage on the net. SABS can't cure stupidity.

On a more serious note, app-specific custom blocking is doomed to failure since so many of those unwanted ads are served on web sites and tweaking the browser for each site is unlikely to be a viable solution for most people, even if it were realistically feasible
[Android Apps and Games] mmotti:
SABS commit - Whitelist fixed

New commit added to SABS.

Whitelisting is fixed - Properly this time!

Adhell was originally coded to simply exclude a given 'whitelisted' domain from the deny rules; behaviour that was carried through to SABS. Unfortunately, with the introduction of wildcards, this did little to nothing in terms of allowing the whitelisting of domains.

The allowrules (whitelist entries) will now be added using the correct 'allowlist' functionality, which is part of the Knox firewall API.

If we look at how this would work with a recent scenario:

Host file: *yimg.com

Unfortunately, this entry was included in a host file and it seemed to block all ebay images. These blocks were listed in the recent activity as "ebayimages.com" and any attempted whitelisting of ebayimages.com were fruitless.

I am pleased to confirm that in the next release of SABS, the whitelist works as expected. Whitelisting *ebayimages.com overrules the *yimg.com block.

[MENTION=6183103]NeedleGames[/MENTION] - These firewall rules are added separately to the deny rules because of the way that the denylist is partitioned into 5000k chunks. If we included the whitelist in that portion of code, it would be adding the same whitelist domains over and over (depending on how big the host file is). It sits just below the blocking of port 53.
[Android Apps and Games] Mike B.:
Chokes on "import com.layoutxml.sabs.utils.SplitList;"
[Android Apps and Games] mmotti:
Knew I'd forgot something. Could you try again?
[Android Apps and Games] Mike B.:
You're OK now that you corrected the name in build 511. Saves me the trouble of getting my hands dirty in Java! ;)

OK = it compiled. Will test further later.
[Android Apps and Games] RelaxDA:
Whitelisting a whole site

Is there a way to whitelist sites or not?

I want to whitelist apkmirror.com (and all pages on it) but it doesn't seem to work, it still blocks ads and the site is detecting the adblocker, am I doing something wrong? I already tried apkmirror.com* and /* is reported as invalid url

Thanks in advance!
[Android Apps and Games] mmotti:
That's not the way firewall rules work. Whitelisting *apkmirror.com will simply whitelist that domain, not the ad serving domains.

You can't allow ads on a site by site basis.

I would either disable sabs when you want to browse with ads, or install an alternative browser and whitelist it within SABS. You could use one browser for ad free* and one for ad enabled.
[Android Apps and Games] Mike B.:
... or simply cope with the 15-second delay APKmirror probably shows you, a small price to pay.
[Android Apps and Games] siracuervo:
https://seap.samsung.com/license-keys/about

Extracted from there:

*The following license types were replaced by the new Samsung Knox license, but are still supported for backwards compatibility with legacy SDKs:

Enterprise (ELM) license – Provides access to SDKs that require partner authentication for production distribution. These include the Knox Standard, Knox Premium, Knox Customization, and the Samsung EDU SDKs*

My ELM key expired and now, since they are deprecated they can't be created. Instead there is a new key called Samsung Knox License (SKL) that isn't compatible with the current activation system.
[Android Apps and Games] Mike B.:
Once again, you need a 128-byte

Legacy

Knox Standard SDK Enterprise license key . Have you tried to simply follow the instructions (or at least loooked at the picture) in the OP? It it doesn't work for you, you overlooked something somewhere. Try again, making sure you do exactly as directed, as everybody running SABS has managed to do.
[Android Apps and Games] NewWorldOrphan9:
Will the option to whitelist with wildcards even be feasible with knox and the way it works by blocking domains (not sure the exact science)? I wanna whitelist "*s.youtube.com/*", so my watch history will work on the Vanced YT App.
[Android Apps and Games] Mike B.:
The new and improved wildcard whitelisting is available in the latest build 513 of the source on GitHub (NOT in the current version 0.0.8 precompiled apk). Note that it still only allows domain and subdomain names, not the "/" you mention. Is "*s.youtube.com" what you want?
[Android Apps and Games] fusionjack:
[MENTION=6150682]mmotti[/MENTION], did you also try to put the whitelist directly in one DomainFilterRule? also: new DomainFilterRule(..., blocklist, whitelist)

i did this some weeks ago and it was working, but i only tested with single domain, not with wildcard like you tested.

what you did was to create separate DomainFilterRule with each whitelist and blocklist.

based on documentation, it should work with only one DomainFilterRule and both blocklist n whitelist.
[Android Apps and Games] mmotti:
I created separate rules because of the way we process the deny rules.

The deny rules are split into chunks of 5000 and then each sent to the firewall individually. If you have 15,000 hosts, there are 3 individual denylists sent to the firewall.

If I include the whitelist inside here, the same whitelist domains will be sent to the firewall 3 times. This isn't good, especially in future if we decide to include a whitelist package with a good handful of domains that we'd like to whitelist.

With them separate, the whitelist is added only once, followed by the individual 5,000 deny list chunks.
[Android Apps and Games] friscoboi:
My Firefox freezes on every start for Up to 10 Seconds. Ist that due to leanplum.com blocking?
[Android Apps and Games] horstzi:
The Installation faild after change the Package name with Apk Editor Pro.

https://xdaforums.com/picture.php?albumid=14809&pictureid=57159
[Android Apps and Games] fusionjack:
i see, you got the point.

i also have the idea to extend whitelist with individual package name. the similar way as i implemented a custom firewall rule, e.g. for blocking port 53 via blocking url ui.
[Android Apps and Games] Nastrahl:
Maybe it's picky about the uppercase?
[Android Apps and Games] horstzi:
No this can not be. I have tried this with many different names but no success.
[Android Apps and Games] mmotti:
I like the idea of this - definitely only for advanced users though lol. It would be far too easy to break without the use of predefined select boxes and/or extreme validation lol.
[Android Apps and Games] Mike B.:
This is not a Firefox support thread, but if you suspect that blocking "leanplum.com" is part of the problem, have you simply tried to NOT block (or whitelist) "leanplum.com". What makes you think that your Firefox trouble is somehow related to your use of SABS?

---------- Post added at 07:29 AM ---------- Previous post was at 07:23 AM ----------

What specific failure message are you getting when?
[Android Apps and Games] mmotti:
New SABS commit

Comments from GitHub:

Remove some unnecessary repetitions; port 53 rules and multiple try/catch/if statements for firewall/domain filter rules.

Rules are now passed to SendRules - Two booleans that accept either firewall rules or domain filter rules:

public boolean sendRules(List<DomainFilterRule> dfRules)

public boolean sendRules(FirewallRule[] fwRules)

Rules are now applied to the firewall with:

// If unable to add the rules to the firewall

if(!sendRules(denyRules))

{

//return false (break the operation)

return false;

}

Which basically says: Send the rules, and if we receive a 'false' (error in applying rules), break the firewall enabling operation by returning false on enableBlocker().

This should also allow us in future to add whitelist / blacklist entries as soon as the user inputs them, without having to turn SABS on / off. We would need to investigate whether it's possible to remove individual domains from the active domain filter rules (for blacklist/whitelist removal).
[Android Apps and Games] Mike B.:
Since some users seem to confuse the precompiled apks occasionally released by [MENTION=6183103]NeedleGames[/MENTION] with what is available in the source, it might be good to mention that the enhanements you describe apply to build 514 (NOT the 0.0.8 build 497 apk).
[Android Apps and Games] LolVersatile:
Where do I get "APK Editor Pro"? I cannot find it on the play store. Sorry if this is a dumb question
[Android Apps and Games] Mike B.:
Maybe mostly an unnecessary question? Even though XDA might frown upon it, we have posted quite a few links to APK Editor Pro and you may want to simply scan this thread if you can't Google for it on your own. Note that APK Editor Pro is only one way to get a fully functional SABS. Consider compiling your own as directed in the OP.
[Android Apps and Games] LolVersatile:
Yeah,sorry about that. I was able to find APK Editor Pro, but I am having trouble installing the package after changing the package name. Following the 3.9.4 format, it keeps showing the error message "There was a problem parsing the package".

Any ideas? Thank you
[Android Apps and Games] Mike B.:
APK Editor Pro (version 1.8.28?) is very picky, one of many reasons why we strongly recommend that you simply compile your own SABS from source. A parsing problem clearly indicates that something went wrong with your patching. I suggest you get a fresh copy of the SABS 0.0.8 build 497 apk and try again
[Android Apps and Games] thejackalsmark:
I used to get that a lot as well even with earlier versions of editor Pro. It came down to an issue with the signing key. I started using zipsigner from Play Store to sign the apks after using editor Pro to make them and never a problem installing them since.

I emailed the dev about it once, but never heard back. *shrugs*
[Android Apps and Games] cohokiller673:
I can't rename the apk with APK Editor because the package name field is greyed out. Why?
[Android Apps and Games] Taz420nj:
I just created one today, no problems.
[Android Apps and Games] Mike B.:
Probably because you are using APK Editor instead of the correct APK Editor

Pro

. Look for links in this thread or let Google find it for you.
[Android Apps and Games] 10pmStalker:
Anyone have battery drain issues? My Note 8 won't last a full day anymore.
[Android Apps and Games] Mike B.:
Huh? You are in the SABS thread. SABS uses no additional battery power at all, nor does it do anything in background. What makes you think it's connected to your battery issues?
[Android Apps and Games] 10pmStalker:
Just the fact that I installed it and have since seen a big decline. Good to know though. I wonder if it has something to do with disabling apps. I disabled quite a bit.
[Android Apps and Games] Mike B.:
SABS merely configures and launches the Knox firewall. Once that's done, it can be safely closed until you reboot or want to change your firewall settings. That said, if you disabled some apps that your system relies on, it's very possible that you triggered a battery drain, but you should be able to find out easily by looking at your phone's Device Maintenance settings, especially the battery usage screens. "Quite a bit" is usually way too much but that's not something SABS can correct for you.
[Android Apps and Games] Taz420nj:
If you're coming to SABS after Adhell issued the cyanide tablet. you really probably just forgot something thats a big hog. I forgot just how much crap I had disabled with Adhell until the killswitch update turned everything back on and all of a sudden my S5 started craaaawling and I was getting bombarded by notifications from all the bloatware about optimizing my system and whatnot. That stupid Peel remote is a big one.
[Android Apps and Games] Mmk005:
Hey hi i just came from adhell i uninstalled it and rebooted my device and then installed sabs but i am still facing the problem in activating the liscence. I am using the same key thats been recommended. Please help me in sloving this issue. Thank you
[Android Apps and Games] khaisttj92:
revoke the current key and get the new knox sdk enteprise license key.
[Android Apps and Games] Mike B.:
The same key? That's probably the main issue. Forget about your old AdHell, and follow the instructions in the OP to get a proper 128-byte Legacy Knox Standard SDK Enterprise license key
[Android Apps and Games] hinds90:
What's the alternative to app editor pro?
[Android Apps and Games] Mike B.:
In theory, any method/patcher that allows you to change the package name of an apk without rendering it unusable would work, but they're seldom overy dependable or user-friendly. APK Editor Pro might be the "least bad" common one, but by far the best way to create a proper SABS apk is to use Android Studio and compile your own.

After all, we are on XDA-

developers

.com! You don't need to be a technology expert or programming wizard; it's as simple as following the steps one at a time. To quote Franklin D Roosevelt: "Only Thing We Have to Fear Is Fear Itself”... ;)
[Android Apps and Games] hinds90:
Yep I'll go that route
[Android Apps and Games] NeedleGames:
[IMG="graph"]https://imgur.com/wXkSdxg.png[/IMG]

So the Adhell's update had a big impact on traffic (it was relesed on 03/02)
[Android Apps and Games] Mike B.:
New feature

The wise users who compile from source instead of trying to patch received a special treat today in build 518: The ability to

export blocked domains

(the disk icon at the top right of the Recent Activity screen). You can now easily see which domains you actually needed to block in the past 24 hours among the thousands in the default packages. You might be surprised at how few you truly need, especially if you combine them into wildcards when appropriate.
[Android Apps and Games] SmileBigNow:
Adhell is back from the graveyard? Well I wouldn't jump back ship since they'll probably go back to the graveyard soon enough for a long period of time like they did till now, so I'm now sticking with SABS!
[Android Apps and Games] snk012:
There are a lot of disappointed comments in the app review.
[Android Apps and Games] Mike B.:
Oh, the original AdHell is still buried deep. What reappeared in the Play Store is not a zombie, it's mostly an impersonator and you'll have to pay (again?) if you want to see that new show. Let's stick to discussing SABS here. We know it works, we can see what it does (open source), it's under active development, and the price is right... ;)
[Android Apps and Games] Mike B.:
Actually, it's more like you have an issue and others have not chipped in yet. I've been dealing with DNS (both local and remote resolution) for quite a while and one thing I've learned is that there are many ways to derail the process at both the device and ISP levels. Quite simply, if your default DNS works for you, keep it. If a custom DNS works better use that, but either way SABS only provides a tool to set the DNS IP and has no further involvement.

EDIT: If you want to get to the bottom of your custom DNS/download trouble, you may want to take a peek at your logs. If your Play Store or download manager have issues, it's probably shown in there.
[Android Apps and Games] NeedleGames:
I will not remove something that works for others.

Also, run in background is not a permission - any app can run in background without any additional permissions and therefore there is no way to remove it.

You entered the original package name or uploaded .apk file to the Samsung's website. Revoke a key and get a new one. You don't need to perform any additional steps than what you find in post #1

There is no limit set by the app but there might be a limit made by Samsung.
[Android Apps and Games] GaresTaylan:
Hoping someone can help. Im having all sorts of inconsistencies from the OP using Android Studio.

An alert will appear at the top of the screen. Select "Sync Now".

-This does not occur. Im assuming that going to File > Synchronize is the same thing.

Wait for the project to load once again.

-It never disappears. Im assuming that is ok?

In Android Studio press a Play button or Shift+F10.

-The play button is not available - it is blanked out. Im assuming I need to set a configuration first? If so, what do I choose?

*EDIT* I tried using Android app but when I set SABS as the module the error in Android Studio states AndroidManifest.xml doesnt exist for has incorrect root tag.

Select your phone and press OK.

-Havent gotten this far but by selecting my phone Im assuming "USB Device" is what is implied?

*EDIT

So it appears that I need to go in and configure an output path and build the file. That step should probably be added to the OP.

However, since trying to do that, I am getting the same thing as mentioned back in post #25. My Android Studio is 100% up to date.
[Android Apps and Games] Mike B.:
Something doesn't sound right. Please double-check that your Android Studio is indeed "100% up to date". When you first installed it, it should have asked you to download various components and that might take a little while on slow connections. Verify that you downloaded the SABS source ZIP and unzipped it, then opened a new project, pointing to your newly created "SABS-master" folder. At that stage, you may be asked to download a few more components. BE PATIENT, there will be a lot of background activity and it might take a few minutes. You won't have to configure anything. After you change the package ID as documented, the "Sync" prompt will appear. At that time, the play button should be enabled. Press the button, connect your device with a USB cable, and the actual build/install should proceed. Remember that you need to have enabled USB debug on your devices. The next thing you see should be SABS running on your device. It seems you somehow missed a step. It might be a good idea to unzip the source again and start a new project again.
[Android Apps and Games] GaresTaylan:
I wound up finding a copy of apkeditor pro and using that. A co-worker of mine followed the same steps in the OP and had the exact same issues as me so we moved on.
[Android Apps and Games] Mike B.:
If you don't use Chrome, there's no reason to enable Port 53 blocking.

The two input files you mention are indeed very similar. The SABS version might currently be a tiny bit "better" but either one will do. Don't use both or try to add more input files, that'd be a waste of resources at best.

Only allowing those first few Google ads without also letting in a myriad of related ads is effectively impossible with only DNS shuffling. SABS can only deal with domain names, not the specific contents of ads.

Only change your DNS if you're positive you need to. In my case, the ISP's default DNS has several issues and the custom DNS servers are much more efficient but that's probably not a common issue. I merely mentioned that it is possible to safely use SABS for that because a user believed it was the cause of his Play Store issues.

---------- Post added at 11:27 AM ---------- Previous post was at 11:18 AM ----------

Whatever works works! ;) If you ever decide to use Android Studio again and find out what you had done "wrong", please let us know. Maybe some of the steps in the documentation need to be clarified. I just now tried a fresh install on another laptop here (Mac), trying to follow those directions to the letter and it all went smoothly but I might be making assumptions that a new Studio user might not make. The benefits of compiling your own is that you wouldn't have to wait for an actual release and could immediately enable any new commits, and also it allows you to gain enough knowledge to take advantage of all the wonderful GitHub projects out there... ipsa scientia potestas est (Google for it!) ;)
[Android Apps and Games] friscoboi:
I dont use Port 53. But all ads in Chrome are blocked.
[Android Apps and Games] mmotti:
They've rolled the change to chrome back I believe due to an unspecified bug. It'll be back I expect.
[Android Apps and Games] friscoboi:
Do i Need to Turn Off and on again after subscribing to new lists?
[Android Apps and Games] mmotti:
Yes
[Android Apps and Games] Resync:
What's the difference between this and adhell2?
[Android Apps and Games] friscoboi:
Adhell2 ist Not supported anymore. This ist The new one.
[Android Apps and Games] Rydah:
Does anyone else's say that it's off but it's really on? Other than that, works well. Thanks OP!!
[Android Apps and Games] Mike B.:
They are two of the several projects that have grown from the original open source AdHell and other tools to tame the Knox firewall. SABS is the latest incarnation, using code from a variety of previous contributors with enhancements. You may want to look at the GitHub repository for more details. SABS is the product that is supported and discussed in this thread.

---------- Post added at 01:54 PM ---------- Previous post was at 01:50 PM ----------

Please explain. SABS doesn't need to be running for the underlying Knox firewall to do its job. If SABS is OFF but your firewall is blocking domains, it simply means that something (SABS or another product) had configured and launched the firewall previously and didn't stop it.
[Android Apps and Games] NeedleGames:
They probably mean blocker fragment not updating and showing blocker is off. I've heard this complaint before once so I'll have a look at why it's not updating.