Android Enterprise: Script to detect if "special permissions" were successfully granted to SOTI agent by the user?

J
Jake
Xplanis AG

Hi all

According to my information, there is currently no way to have the "special permissions" (device admin, draw over other apps, access to notifications etc.) granted to the SOTI agent automatically after enrolling a device. So after enrolling, the user must manually grant the SOTI agent these special permissions. 

Is this correct so far or am I missing something? 

Assuming the above is correct, I want to implement the following enrollment process: 

  1. the device is enrolled in SOTI and is placed in a staging group 

  2. this group contains a profile that installs various required apps from Managed Google Play and sends a message to the device asking the user to grant the SOTI agent all requested (special) permissions. 

  3. as soon as the special permissions were granted by the user, I want to relocate the device to a different group. 

And this brings me to you: can anyone tell me how I can detect if the special permissions were granted to the SOTI agent? Either by running a script on the device or by any other (easier) means? 

I was playing around with compliance policies and trying to figure out a way to detect if the special permissions were granted (so I'd flag the device as non-compliant as long as the permissions were not granted) but I couldn't find a way to do this. 

I assume I need a script that runs on the device to check if the permissions were granted and then writes this information to an INI-file that I can then use as a custom data to check and move the device accordingly. 

But I have no idea how to write a script that checks these permissions. Does anyone know? (Once I know how to determine if the permissions were granted via script, I think I'll be able to figure out how to write this output to an INI-file and then use it as a custom data - it's just the actual check of the permissions that is causing me issues.)

Is that the best way to reach this goal? Or are there other options that you'd recommend? 

Thanks in advance!
- Jake

7 months ago
Android Scripting
ANSWERS
MD
Matt Dermody Diamond Contributor
7 months ago

Depending on the device manufacturer and model you may be able to silently grant those runtime permissions. For example a lot of the OEM Plugins will grant the permissions silently for you once installed. Separate from that I have been successful in using Zebra MX to silently grant these permissions back to the SOTI agent on Zebra android devices. Honeywell has a similar system that would likely work. 

J
Jake
6 months ago

Thanks for the advice. 

I'm using Samsung devices. 

I'll go and check the OEM configuration for Samsung and see if I can find anything useful in there. 

ST
Shawn Tusler
6 months ago
N
Norbert
4 months ago

Hi @Shawn Tusler

That link is not working, would you mind post working link?

Kind regards,

Norbert