• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP][5.0+] SABS - KNOX front end

Status
Not open for further replies.
Search This thread

Mike B.

Recognized Contributor
Nov 17, 2011
3,140
3,173
/
Hello guys. How can i know what needed to be blacklist if below ads still show ? Btw it is WPS Office apps

Unless someone familiar with that app can tell you where and how it gets its ads, you could first try to click on the ad and see which domain it points to. If it's an ad server, you can easily blacklist it, but apps often rely on third party ad providers much harder to spot, or even embed ads in their own domain. The best way would be to use a packet sniffer to monitor your apps' traffic but that's beyond the scope of this thread. Before you spend too much time on this, verify that you have tried with the default packages enabled since they already cover a lot of known ad mongers. Keep in mind that not all ads can be blocked by the Knox firewall, an issue over which SABS has no control.

From a practical standpoint, I suspect you may be using the "FREE" version of your app and that simply purchasing the ad-free version would solve the problem nicely! ;)

---------- Post added at 08:59 AM ---------- Previous post was at 08:49 AM ----------

I think that package names that include "sabs" (or "adhell") could be black listed by some big phone manufacturer who doesn't want you to use knox to disable preinstalled apks, block ads and change some permissions, so license validation may fail if package name is not changed?

Not quite. Samsung publishes a full Knox API but they only allows a very limited number (10?) of "test" active apps bearing the same package name unless provided by a recognized full Samsung Developer (a rather expensive endeavor), and it's not even clear whether they'd allow outsiders to publish such apps. They're not necessarily evil, they are mainly protecting themselves and their partners. Changing the package name is a convenient way to get around those limitations at least for now.
 
  • Like
Reactions: friscoboi

peped94

Senior Member
Nov 23, 2012
1,487
207
Unless someone familiar with that app can tell you where and how it gets its ads, you could first try to click on the ad and see which domain it points to. If it's an ad server, you can easily blacklist it, but apps often rely on third party ad providers much harder to spot, or even embed ads in their own domain. The best way would be to use a packet sniffer to monitor your apps' traffic but that's beyond the scope of this thread. Before you spend too much time on this, verify that you have tried with the default packages enabled since they already cover a lot of known ad mongers. Keep in mind that not all ads can be blocked by the Knox firewall, an issue over which SABS has no control.

From a practical standpoint, I suspect you may be using the "FREE" version of your app and that simply purchasing the ad-free version would solve the problem nicely! ;)

---------- Post added at 08:59 AM ---------- Previous post was at 08:49 AM ----------



Not quite. Samsung publishes a full Knox API but they only allows a very limited number (10?) of "test" active apps bearing the same package name unless provided by a recognized full Samsung Developer (a rather expensive endeavor), and it's not even clear whether they'd allow outsiders to publish such apps. They're not necessarily evil, they are mainly protecting themselves and their partners. Changing the package name is a convenient way to get around those limitations at least for now.
Yes u are right. Im using the free version of the apps and there did offer IAP to remove the whole ads. And im using the default package disable provided in the setting (i tick both of them). May i know what kind of ads that can still shown even we activated SABS ? Im quiet confused on how SABS van block certain apps and some of it still getting to show ads. To answer your other question, if i click on the ads, it will direct me to play store with the apps showed in the ads.
 

Mike B.

Recognized Contributor
Nov 17, 2011
3,140
3,173
/
Yes u are right. Im using the free version of the apps and there did offer IAP to remove the whole ads. And im using the default package disable provided in the setting (i tick both of them). May i know what kind of ads that can still shown even we activated SABS ? Im quiet confused on how SABS van block certain apps and some of it still getting to show ads. To answer your other question, if i click on the ads, it will direct me to play store with the apps showed in the ads.

The only thing SABS and similar DNS-related tools can do is redirect /block domains that an app or site calls by name. For example, "myads.com" which might live at IP "111.222.333.444" can be redirected to "127.0.0.1" (your device's own address) and be effectively blocked. However, if the app/site directly calls "111.222.333.444", nothing can be done. The same hold for tools that allow you to directly alter the hosts file for rooted devices. Many apps are getting smarter and either call their ads by IP address, place ads within their own domain (which you can't block without blocking the app/site itself) or even using cryptic scripts that manipulate the data to force the ad to get through. Other apps are getting even trickier. For example, an app/site that shows videos can embed the ad directly into the video., making it impossible to programmatically determine which is which.

That said, with only a few block lists (the SABS defaults are more than sufficient for most users), you can effectively block the overwhelming majority of ads you're likely to encounter. Realistically, you'll never block ALL ads since "ad" is a subjective concept with no technical definition, and frankly an occasional stray ad or two is not a major problem, much less annoying than having to spend hours searching for a mythical "perfect" list of domains to block.

In your case, if you can't easily find the culprit, either live with the occasional popup ad, buy the ad-free version, or simply find an alternative app that does basically the same thing with fewer or no ads. No reason to obsess over "ad blocking". ;)
 
Last edited:
  • Like
Reactions: u7Xz

Loulou-13

Senior Member
Aug 24, 2013
1,826
666
Marseille
hi!
just an another little question :
There are not another way with android (another app) for to rename this package ? we really only have to use "apk editor pro" ?
 

mmotti

Senior Member
Nov 11, 2014
661
580
Yes u are right. Im using the free version of the apps and there did offer IAP to remove the whole ads. And im using the default package disable provided in the setting (i tick both of them). May i know what kind of ads that can still shown even we activated SABS ? Im quiet confused on how SABS van block certain apps and some of it still getting to show ads. To answer your other question, if i click on the ads, it will direct me to play store with the apps showed in the ads.
To add to Mike's response - Some ad-serving domains are not included in the block lists as they can cause issues.

E.g. You will see Facebook ad choices unless you blacklist graph.facebook.com, but this will cause authentication issues with Facebook / other apps that use Facebook to login.

There's not really a one size fits all for adblocking.
 

Mike B.

Recognized Contributor
Nov 17, 2011
3,140
3,173
/
hi!
just an another little question :
There are not another way with android (another app) for to rename this package ? we really only have to use "apk editor pro" ?

You can use any method that works for you to "patch" the apk (see what Google suggests), but among all the apps that claim to make the process painless, APK Editor Pro is the "least bad" of them all. Compiling with Android Studio is by far the best (and simplest if done right) approach. I just now compiled build 524 and between the time I opened Studio and had the app on my phone, it took less than 10 keystrokes and a grand total of 2.5 minutes.

---------- Post added at 10:50 AM ---------- Previous post was at 10:44 AM ----------

To add to Mike's response - Some ad-serving domains are not included in the block lists as they can cause issues.

E.g. You will see Facebook ad choices unless you blacklist graph.facebook.com, but this will cause authentication issues with Facebook / other apps that use Facebook to login.

There's not really a one size fits all for adblocking.

Yes, "graph.facebook.com" is a perfect example of why I often mention that there is no such thing as an "ad", merely content that a user does not wish to see. For those of us who don't use Facebook, it gets rid of a lot of garbage, but for people who want Facebook it's an essential domain. Someone's trash is someone else's treasure. Vive la différence! ;)
 
Last edited:
  • Like
Reactions: u7Xz

|mickey

Senior Member
Nov 25, 2011
427
149
Hello guys, after updating the app (built it from adnroid studio), everything works fine in regards to validating and submitting the key, which seem to be the biggest issue people are having... I however cannot start SABS, I get a popup stating SABS is off and that's that...

Android studio's console showed no errors so I bet I'm doing something wrong before pressing "turn on" button? Rebooting the app or restarting the device as not helped, neither selecting or deselecting from the orignal block list to mmotti's lists changed anything....

I'm running on a note 8, previous version never behaved like this tho... If there's anything else or any info that might help pls let me know... I haven't but I'll gladly collect logs if you guys find it useful!

Thx!! :D

Edit:eek:k, Fixed it, the reason this was happening was because of a typo when prepapring the package to update... so it instaled the new version side by side instead of simply updating the existing pkg... removing the old version fixed it and everything is back to normal!! I'll leave this here in case someone runs into the same issue..
 
Last edited:

NeedleGames

Senior Member
Nov 22, 2014
507
630
github.com
Hello everybody. For those who are using a Samsung theme from XDA or other online websites, and are fed up with themes being reverted in 10 minutes/after every reboot/at random times - I've got a solution for you. I have just added an option (under SABS settings > Miscellaneous > Force stop Theme Store) that, when enabled, makes the theme store not start and not revert the theme. Keep in mind that this feature is at the moment only available when using the installation process with a computer (android studio), and that you may want for a new apk release if you prefer to install using a different method.
 

Yanchev

Member
Jan 16, 2018
36
3
My girlfriend updated to oreo on her s8 and since then there are number of issues which weren't present before. Facebook and messenger are not working despite having no issues before (I know your recommend whitelisting graph.facebook). What's more always on display started dissappearing which freaked me out. When I disabled adblocking in AoD it is now fixed. I don't know what knox 3.0 changed but I think you should have have a piece of mind.
 

NeedleGames

Senior Member
Nov 22, 2014
507
630
github.com
My girlfriend updated to oreo on her s8 and since then there are number of issues which weren't present before. Facebook and messenger are not working despite having no issues before (I know your recommend whitelisting graph.facebook). What's more always on display started dissappearing which freaked me out. When I disabled adblocking in AoD it is now fixed. I don't know what knox 3.0 changed but I think you should have have a piece of mind.

I don't have a device with oreo so can't test it. Eventually I will fix all the issues.
 

devilnat

Senior Member
Feb 7, 2013
58
22
My girlfriend updated to oreo on her s8 and since then there are number of issues which weren't present before. Facebook and messenger are not working despite having no issues before (I know your recommend whitelisting graph.facebook). What's more always on display started dissappearing which freaked me out. When I disabled adblocking in AoD it is now fixed. I don't know what knox 3.0 changed but I think you should have have a piece of mind.
It used to happen to me once. I couldn't log in or have any functioning apps (fb and messenger) right now with the lasted update it's working fine for me. Please try to install the lasted version. I hope it might help.
 

khaisttj92

Senior Member
Aug 16, 2012
371
126
seremban
Hello everybody. For those who are using a Samsung theme from XDA or other online websites, and are fed up with themes being reverted in 10 minutes/after every reboot/at random times - I've got a solution for you. I have just added an option (under SABS settings > Miscellaneous > Force stop Theme Store) that, when enabled, makes the theme store not start and not revert the theme. Keep in mind that this feature is at the moment only available when using the installation process with a computer (android studio), and that you may want for a new apk release if you prefer to install using a different method.
i cannot open the theme store back.

Edit: i can open back the theme store after uninstall the SABS
Sent from my J7 (2017) using XDA Labs
 
Last edited:

NeedleGames

Senior Member
Nov 22, 2014
507
630
github.com
i cannot open the theme store back.

Edit: i can open back the theme store after uninstall the SABS
Sent from my J7 (2017) using XDA Labs

That's the point. You can't open it and your phone can't automatically open it as well to revent the theme if you have set to force stop theme store in SABS settings. If you want to open it again, simply turn off the option instead of uninstalling
 
  • Like
Reactions: thejackalsmark

khaisttj92

Senior Member
Aug 16, 2012
371
126
seremban
That's the point. You can't open it and your phone can't automatically open it as well to revent the theme if you have set to force stop theme store in SABS settings. If you want to open it again, simply turn off the option instead of uninstalling
cannot toogle the turn off that option. That why i uninstall the SABS.

Edit: after toogle the button on then go back to SABS in turn off the button automatically.
Sent from my J7 (2017) using XDA Labs
 

Attachments

  • Screenshot_20180314-094918.png
    Screenshot_20180314-094918.png
    123.9 KB · Views: 598

android_htc

Senior Member
Feb 24, 2011
433
192
Samsung Galaxy S20 FE
cannot toogle the turn off that option. That why i uninstall the SABS.

Edit: after toogle the button on then go back to SABS in turn off the button automatically.
@NeedleGames
Same thing happened to me... I installed it last night and this morning I was not able to toggle the option to enable themes again.

Disabling SABS as a device admin app...turns off SABS and also disables this features, hence I did not need to uninstall.
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 141

    SABS - Knox SDK frontend

    MOD Edit:- Links Removed

    SABS is an open source tool that shows how to use Samsung Knox SDK without root. It lets developers see how various features work and test them. Some of the features are: system-wide domain blocker, package disabler, permission manager, apps force stopper (examples include theme store), system-wide or app-specific port 53 blocker and more.

    SABS works on all non-rooted (and knox not triggered) Samsung devices with Android Lollipop 5.0 or higher and Samsung Knox version 2.5 or higher. Testers have confirmed that SABS works without any major issues on these devices: Samsung Galaxy S8, S8+, Note 8, A3 2017, S7, S7 edge, S6, S6 edge, J7 Pro, J7 2016, J5 2016, J5 2015. Some testers have confirmed that SABS works without any major issues but others have reported phone reboots on these devices: S9, S9+.

    To develop apps that use Knox SDK or try them out, you need to get the license key. Development license key works for up to 10 devices. To develop an app based on SABS or try it out, you have to also change the package name (id) to get your own 10 development seats. Instructions are below.

    As featured in:
    • Lifehacker:
      "Simple Ad-blocker for Samsung (SABS for short) promises to remove all those pesky ads and then some. The app works by tapping into Samsung’s ultra-secure KNOX software. That gives it the ability to disable packages—A.K.A. the terrible bloatware slathered on by your carrier. SABS also includes a system-level permission manager, giving you an extra level of control over what apps can see and do on your phone."

    • XDA Developers:
      "Along with providing an ad blocker service, SABS can also disable system apps that are impossible to disable within the settings application without root. You can also use it to remove permissions from apps that you can’t usually control."​

    • Gizmodo:
      "There are many adblockers in the Android App Store. Most eliminate ads or replace them with something that does not bother the eye. Simple Ad-blocker for Samsung (SABS) takes that function a little further and does something very welcome: put control of the applications in our hands."​

    Also featured in: Android Community, The Gioi Tre, iCrowdNewswire, TuttoAndroid, InfoGlitz, PametniTelefoni, GameOfThrone, AllAboutPhones, AndroidCure, GizBlog and more!

    Table of contents
    • Donate
    • Setup
    • External links
    • FAQ (post #2)
    • Changelog (port #3)

    Donate
    You can donate to LayoutXML on MOD Edit:- Links Removed
    . I'm a school student who is about to go to university. Every dollar helps.

    Setup
    Congratulations, you are now a developer who is interested in developing (or trying out) an app that uses Knox sdk.

    MOD Edit:- Links Removed

    Following steps 1-i-ii-a takes about 30 minutes. If you follow steps 1-i-ii-b it will take about 2 minutes. Following steps 2-i-ii-a takes about 2 minutes. If you follow steps 2-i-ii-b it will take about 2 minutes.

    Even though the method with a computer takes more the first time, the app will be more stable. Not to mention, that this method is completely free. The method with a phone takes less time at first but you need to use paid app and the app will be less stable.

    1. Setup for the first time

    Every user of SABS needs to receive a license key directly from Samsung.
    Follow along this video to make sure you are following the steps correctly. There are several cuts to hide my personal information in the video.
    MOD Edit:- Links Removed
    MOD Edit:- Links Removed
    [/LIST]


    Step II - Changing the package name
    You can choose to change a package name of the app with or without a computer. Before following the steps below, uninstall any KNOX adblocker you already have installed on your phone such as Adhell, Adhell 2 or Disconnect Pro.

    a - With a computer​
    Follow along this video to make sure you are following the steps correctly.
    MOD Edit:- Links Removed
    [/LIST]


    b - With your phone
    The are multiple ways to change the package name of the app. Following guide focuses on editing the package name with "APK Editor Pro" app. You can also use different apps if such exist.
    Follow along this video to make sure you are following the steps correctly.
    MOD Edit:- Links Removed

    MOD Edit:- Links Removed

    B - With your phone


    MOD Edit:- Links Removed

    XDA:DevDB Information
    SABS, App for all devices (see above for details)

    Contributors
    MOD Edit:- Links Removed

    Version Information
    Status: Stable
    Current Stable Version: 0.0.9
    Stable Release Date: 2018-03-14

    Created 2018-02-18
    Last Updated 2018-03-15
    26
    FAQ

    Is using SABS safe?
    Yes, SABS is open source, it uses Samsung Knox SDK.

    Why do I have to get my own key?
    To use Samsung Knox SDK you need to have a license key. You can get development license for free or become a Samsung partner with a registered business and going through vetting.

    Ads are not blocked on application X. What do I do?
    SABS is simply a frontend for Samsung Knox. Standard package in app is very light to show what can be achieved with Samsung Knox. mmotti's package has more domains and may be used to block more domains. You can add other packages (blocklists) such as adaway if you want to block ads. You can also block domains yourself. You can also ask this question on xda thread (linked below) and learn what packages others are using.

    Do I have to be rooted?
    No. Not only you don't have to be rooted, SABS only works on devices with knox not tripped.
    25
    I have released a new compiled version - 0.0.9.
    https://github.com/LayoutXML/SABS/releases
    23
    Changelog

    Latest version:
    v0.0.9 (2018-03-15)
    Code:
    * Layout fixes (text no longer overlays or gets cropped in some areas of app)
    * Text improvements
    * Improved whitelisting domains (you can now simply whitelist the domain instead of finding it in the package)
    * Removed 1 empty permission
    * Export unique blocked domains from recent screen to a file
    * Choose recent activity time from 1 to 7 days
    * Refresh recent activity
    * Block theme store from being launched - you can now easily use phone themes from XDA or other websites. (works better than simply disabling theme store in package disabler screen)
    * "Restore permissions" option in permissions manager screen
    * More

    Older releases:
    v0.0.8 (2018-03-03)
    Code:
    * Fixed the bug where blocking would not enable/disable or show incorrect value
    * Fixed dialog asking for key going under screen on devices with small screens and big fonts
    * Added a loading screen for enabling/disabling blocking, adding block lists (subscribing), updating lists
    * Integrated mmotti's domain package into SABS now. You can safely enable both (don't forget to remove the old one if you have added it before)
    * Made SABS block domains only once if they appear in multiple packages
    * Added a number that shows how many unique domains are blocked across the all packages (whitelisted domains are not included)
    * You can now also use files inside the subscribe screen
    * Provider in subscribe screen is not cut of anymore
    * Fixed the black theme on dialog asking for key
    * Increased the chances of successfully blocking big domain lists
    * Removed obsolete and not working permissions in permission manager
    * Added descriptions for all permissions in permission manager
    * Changed the versionCode (internal code in SABS) to show number of commits at the release moment
    * More

    v0.0.7 (2018-02-23)
    Code:
    * Added an option to choose whether to block port 53 globally or only on Chrome
    * Fixed some app icons not showing up in package disabler
    * Updated string.xml with clearer wording and improved settings menu names
    * Made long press on an app in package disabler open its settings in phone settings
    * Added ability to control READ_CLIPBOARD permission
    * Sorted permissions in permissions tab alphabetically
    * Fixed custom whitelist being ignored
    * Added more fixes and improvements to blocking enabling including but not limited to: fix to not block duplicate domains, fix to first block port 53, 
    * Added ability to block or whitelist custom wildcards
    * Fixed some issues with domain checking
    * Changed updater from dialog to snackbar on black theme
    * More

    v0.0.6 (2018-02-17)
    Code:
    * Share blocked package list
    * Materialized whitelist, blocking, subscribe, permission in apps screens, redesigned recent activity screen
    * Improved search in package blocker screen
    * Orange selection bug fix
    * New settings screen
    * Ability to disable start-up warning
    * Black theme (amoled)
    * Option to block port 53 (may break some functionality)
    * Removed 15k url limit. The only limit now is set by Samsung (AFAIK ~20k)
    * More responsive UI
    * Margins in settings and in package disabler fixed
    * Made the delete button and checkbox in subscribe screen work all the time
    * Fixed and closed issues 1-6, responded to the majority of feature requests, bug mentions on reddit
    * Cleaned up
    * More small changes (check out recent commits)

    v0.0.5 (2018-02-07)
    Code:
    * Optimized for changing package id - no more crashes (if renamed as instructed above), correct uninstall, shows package id in the settings, about screen and lets you copy it by clicking.
    * Cleared slides shown at the start when first installing.
    * Unblocked port 53 as it is used in many places such as Android Wear. You can expect the option to select whether you want it blocked or not in the future
    * Prompt to restore administrative privileges if they get removed

    v0.0.4 (2018-02-04)
    Code:
    * Recent activity screen design changes and improvements
    * Internal checker that reminds users that the key cannot start with letters "KLM" if their key does
    * A warning screen every time a user opens an app that reminds that it is dangerous to edit some things, and so that there wouldn't be any accidental presses while phone is, for example, in the pocket
    * Ability to rotate screen, scroll if items are out of screen, support for more screen sizes
    * Faster loading for package disabler
    * Search icons in search fields
    * Import and export disabled package list file name chooser
    * List of domains updated
    * Fixes for some domains
    * Removed billing permission
    * Clean-up

    v0.0.3 (2018-01-29)
    Code:
    * Fixed back press button bug where user would be taken unnecessary amount of steps back (not level based)
    * Fixed bottom bar showing in some screens where it shouldn't
    * Fixed some titles in screens
    * Native support for 18:9 aspect ratio - no need to press to expand app
    * Design fixes
    * Asynchronous loading! No need to wait for certain elements to load because it's done in the background
    * Google Duo is now by default in whitelisted apps because of errors in duo
    * Fixed bug where system apps were reported as user apps

    v0.0.2 (2018-01-02)
    Code:
    * Auto updater (notifies about new release, loads website to download)
    * Licenses in settings > about
    * Removed some dependencies (crashlytics, fabric)
    * Updated dependencies
    * Material design package manager
    * Ripple effect
    * Fixed grey background bug (background would change to grey when returning to app when permission manager was on)
    * Menu in permission manager
    * Pull to refresh in package manager
    * Animations in settings
    * Snackbars when turning on/off domain blocking, enabling/disabling packages in manager
    * One fragment renamed in source files
    * Clean-up

    v0.0.1 (2018-01-01)
    Code:
    * New project name, readme file, license
    * Lint correctness fixes
    * Updated build.gradle dependencies
    * New bottom bar navigation view (replaced deprecated roughike's BottomBar)
    * Materialized - many design fixes, compliance with Material design guidelines (not finished). Including but not limited to: margins, text sizes, colors, styles
    * Complete settings menu redesign
    * New app icon, button icons and many other images
    * Tutorial slides
    * About section with links to view source code, send feedback
    * Better (but not finished) error fragments and text informing about errors
    * Many layouts changed to constraint layouts
    * Ability to control extra 308 permissions
    * Permissions are now numbered
    * Scrollbar on permissions manager fragment
    18
    Released a new version of SABS! https://github.com/LayoutXML/SABS/releases
    Also, as of now exactly 3000 people have downloaded SABS (and only 20 of them used a computer to rename package id).

    Changes:
    Added an option to choose whether to block port 53 globally or only on Chrome
    Fixed some app icons not showing up in package disabler
    Updated string.xml with clearer wording and improved settings menu names
    Made long press on an app in package disabler open its settings in phone settings
    Added ability to control READ_CLIPBOARD permission
    Sorted permissions in permissions tab alphabetically
    Fixed custom whitelist being ignored
    Added more fixes and improvements to blocking enabling including but not limited to: fix to not block duplicate domains, fix to first block port 53,
    Added ability to block or whitelist custom wildcards
    Fixed some issues with domain checking
    Changed updater from dialog to snackbar on black theme
    More