Script to grant All Files Access to an application

PP
Parker Palovich
Urm Stores, Inc.

Hello,

I have some Samsung tablets in Kiosk mode that I deploy Microsoft Word and Excel via the Managed Google Play Store.
When trying to open a document that lives on the tablet (/sdcard/Documents/) for the first time, Word or Excel shows a prompt "To browse Office files, photos, and media, you'll need to allow access to all files in Settings" 
Not Now | Go to Settings

When I press Go to Settings from within a Kiosk screen, Kiosk blocks the settings page to enable Access to all files for Word / Excel. Exiting Kiosk does allow me to enable the permissions, however a user would not be able to grant those permissions from Kiosk mode if Kiosk is blocking the prompt.

I did a bit of research for granting the permissions using a Legacy script, but have not been successful. I have tried these, but none of them granted the permission to Access all files:
afw_set_permission_grant_state com.microsoft.office.word android.permission.WRITE_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.microsoft.office.word android.permission.READ_EXTERNAL_STORAGE allow
afw_set_permission_grant_state com.microsoft.office.word android.permission.MANAGE_EXTERNAL_STORAGE allow

Device: Samsung Tab A7 Lite
Android 11
SOTI MobiControl Agent version 15.1.5 1049
SOTI MobiControl Console version 15.3

Any ideas would be greatly appreciated.

Thank you.

3 years ago
Android
ANSWERS
D
DJMOD@SOTI
3 years ago

Hi Parker,

Thanks for requesting a response from SOTI Support Staff, Android 11 brings about some important changes related to the operating system’s restrictions on scoped storage. 

First, scoped storage restrictions are enforced on all device apps. As a result, all Android agents or any third-party app can no longer access files stored in any other app’s app specific external storage.  

Please find the work around solution provided by Soti in here