Normally I root my mobile phones routinely to be able to install and run an adblocker, eg Adaway. Adaway is a system-wide solution that just works, but requires a rooted phone.
More about Adaway here; https://adaway.org.
Rooting a work phone is however not always ideal or even allowed bu the exployer, so it lead me to investigate how to work around not rooting and still block ads effectively.
A normal non-rooted phone user may use eg Blokada. It's a VPN-solution that works very well. It is however a hindrance if you ever need to use your work's VPN-solution to do, you know, actual work when out of office. For me Blokada works, but not good enough on my work-phone.
See more about Blokada here; https://blokada.org/index.html.
2. Samsung, SABS and Knox
While researching the issues about adblocking on non-rooted phones, I came upon SABS.
SABS is short for Simple Ad-Blocker for Samsung, and is a frontend for Samsung's Knox-system.
In the words of SacredDeviL666 of XDA-Developers; "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."
Now this sounds interesting, doesn't it?!
The install and setup is a bit complicated, but well worth the hassle.
In it's simpletst configuration, SABS installs as regular APK's and ties in seamlessly to Knox.
There are a few prerequisites to be done first, before actually installing and run the whole shebang.
Please read through the entire guide once to get a feel for the steps. Then re-read them. It will save you time.
The documented steps worked for me, with a Samsung Galaxy S9 (SM-G960F/DS) and Android 8.0.
The guide assumes you don't already have a Knox-based adblocker installed. Examples are Adhell, Adhell3 and Disconnect Pro. If you do have these installed, uninstall them before proceeding.
Get the needed software.
3.2. The Samsung License key
To use SABS you need a Samsung license key. This is how to get it.
- Create a Samsung account on your phone, if you don't already have one.
- Go to https://seap.samsung.com/enrollment and sign in with your (newly created) Samsung account.
- Go to https://seap.samsung.com/license-keys/create#section-samsung-edu-sdk.
- Find Samsung EDU SDK. Check this pic for reference; https://imgur.com/v7zcsxb.
- Go to Samsung Standard SDK.
- Select a Enterprise license key.
- Enter a suitable name in the Alias field.
- Click Generate license. You should get a license key starting with ELM.
If you didn't, re-read the steps again and repeat the procedure.
- Copy the key, paste it into an empty file and save it using your favourite editor, you'll need it for later.
Another good idea is to mail the key to yourself, to have it available on your phone.
3.3. Hacking the notSABS APK
Before you can install the notSABS apk-file, it must have its name changed. This is done with APK Editor Pro.
Get the APK Editor and notSABS APK-install files to your phone. If you downloaded from your phone, they should be in your Downloads folder.
3.3.1. Installing APK Editor Pro and notSABS
- Go to your file manager and browse to your Downloads folder.
- Touch the APK Editor Pro installer to install it.
You may need to allow installing from unknown locations, meaning from your phone's Downloads folder. It will ask for permission to do so.
- Open the app when the installation is done.
- In the editor, browse for your notSABS-file.
- Select Common edit.
- Edit the name in the Package name field.
Do not edit anything else!
- Change the name from com.layoutxml.sabs to eg com.sorinsrbu.sabs.
The important thing is to keep the number of characters the same, ie three-characters.nine-characters.four-characters, you get the idea.
- Select Direct rename and Rename the package name in resources.arsc.
Do not select anything else!
- Press Save.
- Press Install and then Install once more.
- NotSABS will now show up on your phone as a regular app in the Apps drawer.
- Find it in the apps drawer and start it. Instructions will appear, follow them.
When it asks for the license key, paste it from the file you emailed to yourself earlier.
- You're done.
- Familiarize yourself with the GUI before adding blocklists and disable apps etc.
In no particular order.
- After adding a blocklist, turn off and on SABS to activate the list/s.
- According to the interweb SABS can handle blocklists with a total number of entries of 15000. Anything over that will slow down the phone mpst noticably and may even break SABS, ie it won't turn on at all.
- Ads are not blocked in Youtube. Google serves its ads from the same domains as the videos. If you block those ads, you won't see any videos. In short, there's no blocking ads on Youtube.
- If you find that any of your apps won't work as expected, unblock them in Blocker/Settings/Manage blocking in apps.
- If you find that any of your websites won't work as expected, whitelist them in Blocker/Settings/Manage blocked domains/Whitelist domains.
Just enter the site name and press Allow to let them trough. No need to turn SABS off and on.
- Blocklists. There are plenty on the web, search for them and choose a likely one or two.
I use the below four lists, for a total of about 6000 entries. Together they block most of the bovine manure flying around on the internets.
- The Disabler part of SABS can be used to hide the pesky bloat-apps in the apps drawer. Since your phone isn't rooted, this is the second best way to not see them anymore.
- All disabled apps can be exported to a file, and reimported to a new phone.
- Use this list as a guide to which apps you can disable and hide; https://gist.github.com/baszoetekouw/550e6e47edf9663e52ad7648c7eab83b.
Don't go overboard though, try a few at a time...
- SABS can only handle hostname lists. Lists with other contents than actual site names or IP-adddress is likely to break it. Hostname lists are sometimes called raw or unix hosts lists.