Script to change location settings

JH
Jonathan H
KONE OYi

Good Afternoon,

Version: 15.4.3.1012

We have technician devices which we need the location collected thru a internal timekeeping app. On the Knox enrolled Samsung devices we were able to set the app location permission to always and lock the ability to change. However, we still have about 1,000 non knox Samsung phones (and a few iPhones) which we are not able to set and lock the location permission for this app package.
I was able to find and apply a script (legacy) to set and lock the battery optimization and was hoping to find something similar for the location permission.

I searched here and checked with our MDM management company but could not find any solution. Is there a way to change the location settings on non Knox Samsung devices?

2 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan
2 years ago

For those 1000  so-called "non knox" Samsung phones, what are their device model(s) and firmware version(s)?   Do they have any KNOX runtime libraries  as reported in the "Knox version" entry of "Software information" tab in the devices' Settings?  

JH
Jonathan H
2 years ago

The non-knox (Samsung ELM), which are primarly XCover pro, S9 and S10e, are enrolled thru a seperate path. However, i see in my test device the Knox version  3.4.1 Knox API lvl 30 TIMA 4.0.0

RS
Rafael Schäfer
2 years ago

Take a look into the OEM config app of the manufacturer from your devices. We were able to set it there on non Samsung devices.

Also in the "feature control" profile you can set the location accuracy for example to high accuracy, maybe this could help you.

JH
Jonathan H
2 years ago

The feature controll is what we are using on the enterprise (Knox) devices. But in the profile for the ELM (non knox/non enterprise) we do not have this option. The only GPS related option I found was the "Enforce GPS Availability" but the "Location Accuracy" which locks the settings is missing.

RS
Rafael Schäfer
2 years ago

What kind of Android Proflie you are looking at? Maybe that's the reason for this option is missing.

I looked through: If you use Android Classic, you are right. Any reason to use Classic insted or work managed?

But as said before, we do this via OEM config app from the manufacturer (if available).

RC
Raymond Chan
2 years ago

For Classical Android Plus platform using Samsung ELM device agent, the related scipt command used to be something like

   writesecuresetting -sec  location_providers_allowed  gps,network

Unfortunately, according to my tests done many years ago, the command stopped to work for quite some time well before the Android 10 firmware version that your S9/S10 devices are currently running.   The Knox library have been upgraded and the Android architecture & permission model controlled by Google have changed so much.