Automated Grant Permisson

KF
Keven Forgues
Metro Inc.

Hi,

One of our partners provided us with an application to install for a new Warehouse. I like when the staging in fully automated. In that case i need to manually open the app for the first time and click on "allow modify system setting and Allow display over other apps". It is possible in my package to include a script that allow those tow settings? Or it's need to be hardcoded in the APK?

Thanks

5 years ago
Android
ANSWERS
J
JCMOD@SOTI
5 years ago (edited 5 years ago)

Hi Keven,

Thank you for posting on SOTI Central, 

The agent references the AndroidManifest file when granting permissions that it can grant upon PCG/Package installation. However, high-level permission such as “Allow Modify System Settings” may not be possible. Firstly, I suggest you check if the Android Manifest asks for those two permissions. If they do, you could try an afw_set_permission_grant_state script:

To allow permissions, use this:
Example: afw_set_permission_grant_state org.videlolan.vlc android.permission.VIBRATE allow

To deny permissions, use this:

Example: afw_set_permission_grant_state org.videlolan.vlc android.permission.VIBRATE deny

In the example, you can see the VLC APK Bundle ID, you replace that with yours and then also replace the android permission part with the permission you need. Then try sending it as a script to the device and see if that solves having to manually open the app and set the permissions. If it works, you can include the script within the Package via https://www.soti.net/mc/help/v15.2/en/packagestudio/packages/scripts.html.

Let us know how it goes?

Edit: According to https://www.soti.net/mc/help/v15.2/en/scriptcmds/reference/androidplus_enterprise_do.html It is not possible to grant these types of permissions on third-party apps via the script above. I suggest attempting the "afw_set_permission_policy grant" command and see if the behavior changes.

Regards,

S
Steve
5 years ago

Hello JCMOD@SOTI,

I also have the same problem with another app. I tried both solutions you provided. As you already said, "afw_set_permission_grant_state" is not working. The 2nd solution with the script command wasn't working for me either.

It's a pitty because I'm dealing with this problems for more than 7 months... I would be really happy if I could find a solution for this problem.

SB
Simon Breuer
5 years ago (edited 5 years ago)

Hi Steve, hi Keven.

Unfortunately the script

set_permission_grant_state

is only allowed for standard permissions like accessing storage or others.

The permissions

- Display over other apps
- Modify system settings

are special and critical permissions.

There is no solution to grant them to other apps with MobiControl.


If you are using ZEBRA devices, there is a solution to allow apps to grant these permissions with an MX config file.
But you will need the app signature from the developers.

On other devices (i.e. Honeywell) there is no solution yet.