How to automatically authorize a permission through a script

Good afternoon,

I need to know if it exists a way to automatically enable this authotization through a script: SYSTEM_ALERT_WINDOW.

I need to activate that for a specific application.

All devices are Zebra devices of different generations: Android 8, 10 and 11.

Is this possible?

Thank you, best regards.

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

According to official MobiControl online manual, e.g. found at  https://soti.net/mc/help/v15.6/en/scriptcmds/reference/androidplus_enterprise_do.html

the afw_set_permission_grant_state script command cannot be used to grant  special permissions such as  "Draw Over", which is the "Allow display over other apps" permission shown in your screenshot.

Anyway, the afw_set_permission_grant_state  script command seems to have problem with other app permissions in many of my previous tests on different devices done in the last few years.  I personally hope that this script command can eventually be more stable across different device brands and firmware versions.

GB
Giuseppe, Brando
2 years ago

Thank you, I also found this one:



I need to do some tests, but I will in January since the customer is closed for the festivities.
I'll give you feedback once I'll have it.

Best regards

RC
Raymond Chan Diamond Contributor
2 years ago

Based on my field-tests of request_appops_permissions script command with large number of device models, the command only shows a prompt on the device screen for device end-user to grant the corresponding permission interactively,  rather then granting the permission SILENTLY as mentioned in the documentation. Maybe I was just not lucky enough to work on device models that do support SILENT granting.

If it works silently in your case, please share detailed information about the models, firmware version & build numbers, and agent version/build numbers.

T
THMOD@SOTI
2 years ago

Hi Giuseppe,

 

Thank you for posting on SOTI Pulse and thanks Raymond for posting the answer.

 

Currently, we don't have any script to activate this option as mentioned in SOTI Help page.

 

https://soti.net/mc/help/v15.6/en/scriptcmds/reference/androidplus_enterprise_do.html

 

Do you find it helps to answer your inquiry?

 

If yes, please help to put this post as Solved.

 

Thanks.

 

Kind regards,

Technical Support | SOTI Inc. | 1.905.624.9828 | support@soti.net | www.soti.net |