yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] mmotti:
It'll be the UI not updating properly.

This is one of the arguments for an async task for enabling and disabling, alongside implementing fixes for the fragment refresh / status checking.

Async task would be very appropriate for this scenario as it gives you the ability to complete tasks before, during and after task execution etc.

I believe on refresh the fragment only checks if the firewall is on or off. Of course if sabs is still adding firewall rules, the firewall won't be enabled yet so the state is the reported as disabled and you see the 'turn on' button.

Another issue is if you come out of a menu e.g. Custom url providers, then try to enable or disable, nothing happens. You have to rotate the screen and try to enable and disable again before anything happens.

[MENTION=6183103]NeedleGames[/MENTION] this was the issue with Adhell. Not sure if you've looked at this yet?
[Android Apps and Games] Resync:
Okay I guess I'll try this one tomorrow, I am currently using adhell it seems to work fine on oreo...
[Android Apps and Games] NeedleGames:
This is my top priority at the moment.
[Android Apps and Games] NeedleGames:
2000 downloads!

19 used a PC and others (>1980) downloaded an apk file.

Sadly I don't know what the actual number of installs is because there is no tracking in app.
[Android Apps and Games] krazyates:
I'm getting "package corrupt" when I try to install after I rename the package.

Any ideas?
[Android Apps and Games] Oops...:
It's really impressive how you try to get people from the dark side (i.e. trying to patch) to the bright side (i.e. build from sources). :laugh:

So I will spend the two minutes to update my local build and enjoy the new goodies :silly:
[Android Apps and Games] Mike B.:
Haha.. you're doing it too: "trying to patch" (a questionable endeavor) as opposed to "build from sources" (a statement of fact)! ;)

I just encourage users to avoid the struggles of patching obsolete apks versus simply pushing a couple of keys to compile the very latest. I don't even say anything about how much they could accomplish at a bash prompt! ;)
[Android Apps and Games] android_htc:
Nice feature, only 34 blocked domains for me!
[Android Apps and Games] Mike B.:
Told ya! ;)

Keep track of what you block over a period of time in a local file, then you could simply disable all standard packages and use as your sole provider (blacklist) the custom list of domains that matter to YOU, without any need to further update providers (or run SABS) until you see new ads creeping in. The whole "ad blocking" thing becomes very simple with that approach. That's what I've been doing here for quite a while and the only significant change from my ancient AdAway custom hosts file is that it's now even smaller thanks to the SABS wildcard processing ability.

EDIT: Starting with build 520, it's now possible to capture and save a list of domains actually blocked during the past SEVEN days. This should result in a very good snapshot of the user's real-life needs.
[Android Apps and Games] u7Xz:
I know that this has been discussed before just couldn't find the reason why that's happening to some people and some are fine. The DNS thing blocking the Play Store I tried Yalp Store which is an open-source Play Store alternative, the same thing happens there also just wanted to discuss why that's happening. Thank all you contributors to SABS amazing project!
[Android Apps and Games] Mike B.:
The effects of the "DNS thing" depend on which specific DNS servers you pick as well as your location and which ISP you use with which apps. For example, several users reported that Google's DNS seems to cause problem for their Play Store. Simply put, if your default DNS works for you, leave it alone. If you have a valid reason NOT to use it, for example if you're in a country that blocks sites you wish to access, try several alternative servers until you find one that does what you want. SABS merely tells Knox to use whatever you tell it to, it has no control over how well that DNS server and your apps play together.

EDIT: The whole business of turning a canonical name into a valid and accurate numeric IP has very few technical requirements. It's not even a proper standard, more like conventions with which many operating systems, servers, ISPs and apps take great liberties.
[Android Apps and Games] Taz420nj:
Just FYI, no its not an impersonator, this was in fact an update to the "original" app. The guy who originally developed Adhell is a Samsung employee who used insider information and an unauthorized Knox key to develop an unauthorized app, and he was basically threatened to lose his job unless he pulled it from the store and Git. However that didn't take care of the tens of thousands of copies already installed (which continued to work), so the final part of his ransom was to put it back into the store with an "update", and when everyone's devices silently updated over the past week, it acted as basically an uninstaller, reactivating everything disabled by the package disabler and removing the firewall rules. The "enterprise" features are vaporware. There won't be any further updates to it unless/until they fire him (and even then his NDA will probably prevent it), because it still violates Samsung's policies. Had he not been an employee, we wouldn't be having this discussion. [/soapbox]
[Android Apps and Games] Mike B.:
Yes, I'm familiar with that story. As mentioned previously, the current AdHell in the Play Store is not the old AdHell revived, but a different animal. It's best not to speculate about internal details, and it doesn't really matter in this SABS thread except for the end result: SABS is now helping a lot of new users control their Knox firewall, and it doesn't cost them anything! ;)
[Android Apps and Games] Taz420nj:
Yes. It IS the "old Adhell revived". If it weren't, then it could not have POSSIBLY "updated" our previously working version of Adhell with the kill switch. They did it because it was the only way they could disable all the remaining copies in the wild, since nobody was going to voluntarily uninstall it.
[Android Apps and Games] Mike B.:
Not quite correct. FYI, all it takes is using the same package name and signature to allow an update, and the actual contents of the app matter little, but once again: this is the

SABS thread

and it's best to discuss other apps in their respective threads.
[Android Apps and Games] u7Xz:
Thank you. Its actually the DNS thing is even more important then adblocking lol. I am from Turkey and you cant know how DNS is a lifesaver for me.

BTW why can't I press thank button? From web and mobile, i just cant is something blocked?
[Android Apps and Games] mmotti:
Changing of the DNS within SABS can / will only work when it's possible to exclude those apps that it breaks. This functionality isn't currently available.

Forcing DNS on some apps seems to have the same effect as blocking it entirely (by restricting port 53).

Playstore, Netflix etc obviously have a reason to require their own DNS requests to be made separately to those provided the ISP or user.

I do wonder whether YouTube ads could be circumvented by blocking port 53 on the YouTube APK. I have a pihole setup on my network and I don't get any ads through YouTube on my TV, only through my phone.

Edit: re. YouTube.. Apparently not.
[Android Apps and Games] NeedleGames:
If you can, try this blocklist for youtube: https://github.com/HenningVanRaumle/pihole-ytadblock/blob/master/ytadblock.txt

I can't test this because I don't see any ads in my country either way :D
[Android Apps and Games] Mike B.:
APK Edito Pro

I know some of you had problems finding the APK Editor Pro that's suggested as a way to change the package name of a SABS apk. There are links to the current version 1.8.28 easily found by Google, but it seems that it's currently in the Play Store again, at least for some people. Check out https://play.google.com/store/apps/details?id=com.gmail.heagoo.apkeditor.pro. Remember, you need the PRO version.
[Android Apps and Games] Taz420nj:
I have an inbound VPN on my Firebox, which funnels through my pihole. When my phone is connected to it, I don't see inline ads in Youtube. It's because Pihole blocks the same way ABP and uBlock do - by expression matching, so they can block first-party ads without blocking the entire site.
[Android Apps and Games] luongtuan93:
Step 2, A, 1. Download and extract the latest source code of the SABS app here.

The download link is

but the latest release link is

what is the difference?
[Android Apps and Games] Bobthahog:
The 1st one is the one you compile yourself and has latest commits. The 2nd is the already compiled apk.
[Android Apps and Games] Cr4z33:
Edit: nevermind.
[Android Apps and Games] Mike B.:
The "Sync Now" option should pop up towards the top of your Android Studio screen as soon as you make any changes to the code that appears after you click on "build.gradle (Module:app)". Make sure that Gradle is completely done installing/updating before you start changing the source. If you're not positive it completed, simply close the project and re-open it again, keeping an eye on the progress reports that should appear on the bottom status line. If it's your first time using the Studio, it might take a while before it's ready.

The attached screenshot is from a Mac. It might be slightly different on another OS but very similar.

EDIT: I see that you apparently solved your problem, but I'll leave my message up in case others find it useful. Out of curiosity, what did you do to fix your issue?
[Android Apps and Games] Cr4z33:
Thanks for your help. :D

I solved by using the mobile edit method.
[Android Apps and Games] khanvict90:
is this a joke simple adblocker yes but no thanks to much steps to do :) gonna use disconnect pro again
[Android Apps and Games] Mike B.:
Thank you for your feedback. As clearly documented, SABS requires the ability to read and follow some simple steps. Samsung's Disconnect Pro, which is no longer readily available or supported, was a way to enable some of the features of the Knox firewall and required not only some reading but also $25. Another alternative which requires no step or purchase is to simply ignore any ads on your device. As long as you're satisfied with whatever you opt to use, it's great! ;)
[Android Apps and Games] Sami Jildeh:
After i use APK editor pro method and successfully made it to work.

I uninstalled and tried to install it by Android studio method, it successfully worked. i changed the name of the package and installed it on my phone. I enabled admin and then it didn't ask for key. after i enabled and disabled it some times it start blocking ads. but in recent activity under disable sabs button i don't see any button to save the blocked sites.

Am i should do something in Android studio? or this is enabled in version newer than 0.0.8?
[Android Apps and Games] Mike B.:
I suspect you may have used an older version of the source. That feature first appeared in build 518 (the little disk icon at the top right in the attached screenshot). It was further refined in build 520 to allow selection of how many days - up to 7 - you wish to show/export (the clock icon). To have the very latest, simply download the current source ZIP from GitHub, and recompile with Android Studio again, making sure you use the same package name you currently use. No need to uninstall anything and all your settings will remain.

EDIT: I should probably further explain that the version number (currently 0.0.8) is an arbitrary string that [MENTION=6183103]NeedleGames[/MENTION] assigns whenever he provides a new precompiled apk. Between releases, many commits (changes/additions) to the source are made, and the current number of commits is what we refer to as build number. I believe that the precompiled "0.0.8" on GitHub was build number 497. Look at the "About" screen of your apk, and it will show that build number as "internal code".
[Android Apps and Games] Sami Jildeh:
I download the source code from the release tab [see screenshot]. is it an old source?

Am i suppose to download using clone or download green button?
[Android Apps and Games] Androidlover99:
Just wanted to say what an awesome app! I noticed this one adblocks more places than Adhell 2 did. You should include some pictures when using Android studio to modify the APK name, and I noticed that some apps for some reason appeared twice when searching them? For example, Samsung Calendar appeared twice and idk why.... I don't remember Adhell 1 or 2 doing this, other than that it's a great app! Keep up the good work! :)
[Android Apps and Games] Mike B.:
You downloaded the source code

for the last release

(the 0.0.8 apk), not the latest. You need to grab the

current

source, under the "Code" tab ("Download ZIP", bottom right of the enclosed screenshot).
[Android Apps and Games] Mike B.:
Remember that what matters most is which domains lists you choose to use. If it blocks more for you than AHell2 did, that's probably because you're simply using input lists that block more relevant domains.

To change the package name (different from the apk name!), take a peek at my post #801 (https://xdaforums.com/attachment.php?attachmentid=4444038&d=1520785086). The package name which you must change appears just below where that screenshot ends (it's called applicationId).

I'm not sure about your duplicate names, but it might simply be a caching issue on your device. Stopping (not uninstalling!) SABS and starting it again might be enough. Remember that SABS doesn't need to be running unless you need to change/view its settings.
[Android Apps and Games] esmaeil mohamadi:
tanx 4u
[Android Apps and Games] Mike B.:
Please PLEASE edit your post to remove that huge unnecessary quote of the OP. Since you've been a member for almost 3 years you might have noticed that it's strongly frowned upon and even possibly against our basic posting rules. If you wish to thank [MENTION=6183103]NeedleGames[/MENTION], simply hit the

"Thanks" button

on any one of his posts.
[Android Apps and Games] esmaeil mohamadi:
]

Be sure
[Android Apps and Games] Sami Jildeh:
Just wanted to say that even after using the latest version [btw i got the export option]. At About i still get internal code: 497.

Thanks for all your help.
[Android Apps and Games] Mike B.:
Sorry, my error, I forgot to engage my brain before replying. Your internal code will still show 497, that's correct. Here, to keep track of which build I use, I change the version number, for example, "0.0.8.520" for the latest. At least if you grabbed the current source, you have all the latest commits.
[Android Apps and Games] Oops...:
The internal code is defined in build.gradle file. It's still unchanged. However if you indeed used the current version, you compiled what we call build 520 :good:

I personally patch the internal code to match the build on GitHub. Then I know exactly when it is time for a new one ...

Edit: I was obviously too late with my response
[Android Apps and Games] Mike B.:
Never too late as long a you're right! ;)

Minor caveat about changing the internal code to a greater integer: if you try to compile an older/lower version, I think Android Studio will refuse to install over the newer one, but that's easily fixed.
[Android Apps and Games] Oops...:
Didn't know this detail about the internal code. Thanks for that ;)

Edit: just tried to install one of my previous builds with lower internal code. Install was refused .. But hey, who would want to go back? :laugh:
[Android Apps and Games] Mike B.:
Not all commits are perfect. If you ever want or need to compile a previous build, it might be wiser to NOT touch the internal code aka android:versionCode (integer of increasing value, enforced) and simply change the (free-format, unchecked) "version number" string aka android:versionName. A bit confusing, I know.
[Android Apps and Games] jed84:
I try to modify the file as instructed by using apk editor Pro. And.. I stucked at the bety beginning.

Could someone please tell me where can I find an option to Select "Common edit".?

Here is the instruction from the 1st page :

Download the latest version (apk file) here.

Open "APK Editor Pro" app.

Select apk file (previously downloaded).

Select "Common edit".

Edit only the field "Package name"! as shown here.

Change the "com.layoutxml.sabs" to the sequence of letters and digits you used before. You can see what was your previously used package name in SABS Settings > About > Copy Package Name.

Select "Direct rename", "Rename the package name in resources.arsc". Do not select the other options.

Press Save.

Press Install and Install again.

SABS app will appear on your phone. Open it and follow instructions on the screen. If it asks for a license key - paste the one you have received in Step 1.
[Android Apps and Games] khaisttj92:
open apk editor pro then click the SABS apk then choose common edit and change package name
[Android Apps and Games] Mike B.:
No need to repost the OP's instructions. If you (1) downloaded the latest SABS apk, (2) opened APK Editor Pro, then (3) selected your SABS.apk, the dialog with the "Common Edit" option will pop up. If it doesn't, that means you didn't follow at least one of the first 3 steps correctly. Only you know which one(s). See the attached screenshot.
[Android Apps and Games] jed84:
Seems I have some incorrect version of apk editor pro. I did downlod 1.9.0 from aptoide.

Would be gratefull for an information which one should I use .

Wysłane z mojego SM-P905 przy użyciu Tapatalka
[Android Apps and Games] Mike B.:
You may find it useful to read more of the thread besides only the OP. I have no idea what's on aptoide, but the current version on the Play Store is 1.8.28, as reported THERE as recently as yesterday.

EDIT: there is a file floating around named "apk-editor-pro.apk" (19 MB) which is actually aptoide.apk 8.5.0.1 (NOT an apk editor) and should probably be avoided. I located an APK Editor Pro 1.9 apk (build 110, 7.9 MB - not yet available on the Play Store) which matches the official signature. That version behaves just like 1.8.28 (build 106) and you should see the very same "Common Edit" option. PLEASE be careful when downloading from "unofficial" links!
[Android Apps and Games] iBreakStuff:
I don't know if anyone else is having and issue like this, but I've got SABS installed properly, updated and active. It seems like anytime I make a change I have to completely reboot my Note 8. On top of that when SABS is active it blocks anything from accessing the net. I've gone through and unselected every app on my phone manually and nothing gets through as long as it's active. By disabling and then rebooting I'm back to normal. I've got no other firewalls of any sort of my phone and never have. Am I doing something wrong? I've even tried using OpenDNS as a different route to no avail. I only have the two default lists. Any help appreciated.
[Android Apps and Games] bkandfries:
Wow amazing job on the update. Followed the update instructions and everything worked smoothly. (APK Editor pro v 1.8.28 found from careful googling and not the one from play store)

It added StevenBlack's host file first time around without a hitch, so super glad you got that fixed. :) Also my first time actually donating off the popup, maybe those pesky prompts actually do work after all. :p
[Android Apps and Games] Varelka:
Hello!!! Can somebody put here apk or link to the latest apk (build-compiled by you, not by author)?

Отправлено с моего SM-J530F через Tapatalk
[Android Apps and Games] friscoboi:
The we both would have The Same Package Name? You have to build your own. Or Not use it.
[Android Apps and Games] Varelka:
I'll change package name to my own and everything will be OK. I simply can not compile latest release by myself, and if you give me your (compiled by you) apk, I'll use it after proper changes.:good:
[Android Apps and Games] Loulou-13:
hi !

i hope that you can understand my poor english...

big problem to instal this adblocker....i have read this thread for solutions ,try X times and..... nothing ! fail...

i have the last app apk editor pro...

but how do you rename this package ?(why this apk need to be modified first ???)

i try to rename with this example (not really my rename):

" 123.azertyuio.p456 " ....it show "succes" but impossible to instal with the button "instal" at the bottom in "apk editor pro" ==>signature failed

And i instal this apk modified directly by the "download" file to my phone (where i download all things with my browser) ....i put my knox key (it's the good key ,not expired...) ==> impossible ! "fail" !

details:

previously i used adhell2 ,work like a charm ...my previous key have expired since some days and i have generated a new one for sabs ...

i have uninstalled adhell2 and reboot my phone before instal sabs ...
[Android Apps and Games] friscoboi:
You need to rename because you use it with a Samsung Developer Key. So each App has to have individual Package Name!

Cant Help with Apk Editor. Best way is to do it with Android Studio.

You Put in The Knox Key AFTER installing Sabs.
[Android Apps and Games] Rain890:
I think I installed everything correctly, Is there a way to test if it works? Because the one app I have that has ads on it aren't blocked.

Edit: Never mind, It appears i just needed to turn it off and on and now it works perfectly. Many thanks to the dev!
[Android Apps and Games] Loulou-13:
but my example of rename is correct ?
[Android Apps and Games] Mike B.:
You don't say which SABS version you use and how you changed its package name, but something is definitely wrong with your configuration. Which changes did you try to make and why did that force you to reboot? A few more details would help so that we can best help you.

---------- Post added at 08:29 AM ---------- Previous post was at 08:22 AM ----------

If you don't want to or can't compile your own from source, you can simply download the latest release apk (0.0.8) and change its package name as many users do. Your request for someone else to compile a custom apk and do the work for you seems a bit ... No, I won't say the word I had in mind... ;)

---------- Post added at 08:34 AM ---------- Previous post was at 08:29 AM ----------

If you now have SABS installed, check the "About" dialog to verify that it has the package name that you wanted. Also make absolutely sure that you created and used a 128-byte Legacy Knox Standard SDK Enterprise license key.

---------- Post added at 08:36 AM ---------- Previous post was at 08:34 AM ----------

Yes, it is a correct possible name as far as Android is concerned but APK Editor PRO might have other requirements (not all versions behave identically).
[Android Apps and Games] Mike B.:
Your request (demand?) to have someone work for you is unfortunate, to say the least. The 0.0.8 apk provided on GitHub IS the latest official release and you can download it then change the package name, as suggested. Apparently, what you want is an unreleased version compiled from the very latest source. If someone were to comply with your request, they would have to grab a fresh copy of the source, then compile it just for you for no clear benefit since it would become obsolete the instant a new commit appears (we were on build 520 when you posted, but now on build 521). Users are strongly advised against using any apk from an "unknown source". If you finally decide to create your own version, do NOT post it here as it would defeat the purpose of open source and interfere with [MENTION=6183103]NeedleGames[/MENTION]' release schedule, further confusing other users.

In other words, as stated many times, either grab the current release apk or compile your own apk from source. The choice is yours.
[Android Apps and Games] Varelka:
Be so kind, give me please a link to the latest source, as you say build 521.
[Android Apps and Games] Nastrahl:
You renamed it with a wrong format.

Keep the "com." at the start

The nine letters between are OK

No numbers allowed for the last 4 chars, only letters.

But before uninstall the previous SABS, or check its former name as suggested and rename the new one identically.

Be sure to turn off SABS before though.