Granting permissions to 3rd party custom app

Solved
IS
Ian Stuart
Cross Country Couriers

Hello,

I am trying to install a custom app via SOTI for testing and possible deployment.

Agent version is 15.4.5.1051, OS is 02-32-04.00-OG-U16-STD, Model is Zebra TC56J enrolled as Work Managed Device.

I've deployed the app to the device as a package, and added it to the lockdown screen. However when launching the app it says I need to grant permissions. SOTI doesn't allow manually giving permission to the app. It seems SOTI isn't granting permissions to the app upon install.

Is there any documentation on mannifest data and how this needs to be declared to SOTI for granting permissions? Thanks.

2 years ago
Android
ANSWERS
MD
Matt Dermody Diamond Contributor
2 years ago

A Package based APK install on an AEDO A8 Zebra device should result in most permissions being granted automatically. 

What specific permissions are missing and are being prompted?

How is the APK being installed?

Do you have the Zebra plugin installed on the devices?

IS
Ian Stuart
2 years ago

Hi Matt,

The permissions missing are Camera, Location and Storage. When trying to manually grant them it says "Action not allowed, ,this action is disabled by SOTI MobiControl."

The APK is being installed by loading it into SOTI's package builder as Android APK, then building and deploying it via a profile.

The Zebra plugin is indeed installed, the MDMPlugin_Notification one correct?

MD
Matt Dermody Diamond Contributor
2 years ago

This is unexpected behavior to me. Under these combination of conditions I would expect each of those permissions to be silently granted automatically during the install. 


I have a custom app that has similar permissions declared in the manifest and they are granted silently automatically when installed by SOTI as a package. Looking at the manifest I see that the first two are features where as storage is classified as a permission.

 <uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.location" android:required="false"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/> 

Reviewing my package for this app I am reminded that I have the following in my post-install script
afw_set_permission_grant_state com.my.app android.permission.WRITE_EXTERNAL_STORAGE allow afw_set_permission_grant_state com.my.app android.permission.READ_EXTERNAL_STORAGE allow

Solution
IS
Ian Stuart
2 years ago

Matt,

You are correct here. Sorry to waste your time, it seems the developer of the app put in permissions into the maninfest that aren't even valid for Android 8. It would open on a device without SOTI but crash later on, whereas with SOTI it wouldn't even open so they blamed SOTI.

I suspected this but couldn't verify as I'm an MDM admin, not a Android dev. Thanks for the verification checks though, it was a helpful sanity check. Thanks again for the assistance.

EG
Edgar Gomez
2 years ago

App permissions are devided into install-time permissions and runt-time permisssions.

Install-time permissions are granted when Mobicontrol installs the app.

Runtime persmissions are requested when the user opens the app the first time.

So, if you have a lockdown you must include (as a hidden item) the activity that shows up when permission is requested.

Here a link for your reference:

https://developer.android.com/guide/topics/permissions/overview

IS
Ian Stuart
2 years ago

Thanks - good to remember, and I did have this added, but the root problem turned out to be an app-specific issue.

M
MPMOD@SOTI
2 years ago

Hi Ian,

Thank you for posting on SOTI Pulse! 

I am glad to see that your issue was resolved. 

Please feel free to reach out to us if you have any further questions in the future.

Kind regards,

Technical Support Specialist | SOTI | +1 905.624.9828 | SOTI.net lDiscussion Forum | Log a Case Online l Facebook l LinkedIn l Twitter