For an customer we need to give storage permissions to an app, which we’re deploying with scan2deploy on an android 11 device (Memor 11).
When attaching by usb on my notebook, and i use the following command
adb shell appops set --uid MANAGE_EXTERNAL_STORAGE allow
the app will be given the right permissions. I tried this command within the scripts section by scan2deploy (even with the intentsdk), but this isn’t working. Is there another option to manage this by scan2deploy?
I’ve just repeated a test on a Memor 11 with FW 1.03.07.
For the test I installed a demo app named "ScopedStorageTester.apk ". This app is designed to Manage all files on the device storage, by declaring the
MANAGE_EXTERNAL_STORAGE permission in the manifest.
The menu " Settings → Apps & Notifications → Advanced → Special App Access → All File Access" shows the list of all the apps that can request that AppOpp permission. In my device there is only the just installed “ScoperdStorageTester” app, which just after installation results “not allowed”.
Now with Scan2deploy Studio:
- create a new profile,
- in the Actions Selection page select “Script”
- in the Script Section add the script:
appops set --uid com.datalogic.mobile.tss.scopedstoragetester MANAGE_EXTERNAL_STORAGE allow
- in Save&Print generate the Profile’s QR Code.
Then, on the device, open Scan2Deploy agent and read the QR code.
Let Scan2Deploy agent to apply the profile.
Now, if you go again to “Settings → Apps & Notifications → Advanced → Special App Access → All File Access” you will see that the “ScoperdStorageTester” results as “Allowed”.
This is a possible check lists to verify what is wrong with your app:
I hope that this helps.
Mobile Products L3 Specialist - SW Engineer | Datalogic