Eric Short
Jan 12, 2018
7:42 pm

Admin does not have com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM

I get an error that I am missing permissions.

I am using Customization SDK, knox v 2.8, and I am activating KLM and then ELM before I try to shutdown the tablet.

I have the permissions in my manifest as :

<uses-permission android:name="com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM"/>
<uses-permission android:name="com.sec.enterprise.knox.permission.CUSTOM_SYSTEM"/>

Here is a log showing the exception:

Utilities: knox major version=2, minor version=8
com.trakitgps.logger.Log 2018-01-12 11:57:57,022 - Utilities: Knox installed=true
com.trakitgps.logger.Log 2018-01-12 11:58:01,044 - WatchDogIntentSender: add tickler for guid=c1515783481044, duration=null
com.trakitgps.logger.Log 2018-01-12 11:58:01,717 - TrackItActivity: KnoxLicenseReceiver, Knox License activation=success
com.trakitgps.logger.Log 2018-01-12 11:58:01,719 - TrackItActivity: activating Knox license for shutdown
com.trakitgps.logger.Log 2018-01-12 11:58:07,887 - TrackItActivity: EnterpriseLicenseReceiver, License activation=success
com.trakitgps.logger.Log 2018-01-12 11:58:07,889 - TrackItActivity: shutting down tablet
com.trakitgps.logger.Log 2018-01-12 11:58:07,897 - TrackItActivity: Got exception shutting down e=Admin  does not have com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM OR com.sec.enterprise.knox.permission.CUSTOM_SYSTEM

Similar topics

No similar topics found.
Samuel G.Samsung SEAP Moderator
Jan 12, 2018
9:16 pm

Hi Eric,

Which API are you using that is causing this error? Also please provide your device model, OS version, and Knox version.

Thanks,

Sam

Comments

Sam,

I am using Knox Customization API 2.9 to shutoff the device.  Knox 2.8.06001048, Samsung Tab E SM-T377V, OS Android 7.1.1.  I wait until the KLM and ELM licenses are activeated and have responded to my recievers.  

My code to shutdown the tablet is:

SystemManager kcsm = SystemManager.getInstance();
kcsm.powerOff();
Eric ShortJan 12, 2018 at 10:58 pm

Hi Eric, when you generated the license keys you're using, did you select Samsung Knox license key or Enterprise license key? If you selected Samsung Knox license key, please try generating enterprise keys and try again, as Samsung Knox keys don't currently come with Customization namespace permissions. Thanks!

Samuel G.Jan 12, 2018 at 11:42 pm
Eric Short
Jan 13, 2018
2:33 am

Sam,

I regenerated my licenses and am still having the same results.

Samuel G.Samsung SEAP Moderator
Jan 15, 2018
5:58 pm

Hi Eric,

Could you send me a dumpstate of the device after reproducing the error at s.goldwax@partner.samsung.com? Also please ensure you're using the grantRuntimePermissions API to get these permissions at runtime.

Thanks,

Sam

Comments

I have started calling applyRuntimePermissions and keep finding new ones.  Could you tell me what permissions are required in the AndroidManifest.xml and which permissions are required to be granted at runtime in order to make the powerOff() API call?

Eric ShortJan 17, 2018 at 2:13 pm
Eric Short
Jan 17, 2018
2:50 pm

I am now seeing "Admin  does not have android.permission.sec.MDM_APP_MGMT OR com.samsung.android.knox.permission.KNOX_APP_MGMT".  My app is setup as device adminsitrator.  Is there specific rights that go into my xml that correspond to these missing rights?

Samuel G.Samsung SEAP Moderator
Jan 17, 2018
6:08 pm

Hi Eric,

Is the new missing permissions error coming after applying the customization permission at runtime? In general you should applyRuntimePermissions for all permissions you want to use, as well as putting them in the manifest. Is it the same powerOff call that is creating this permission error? The powerOff method should only need the com.sec.enterprise.knox.permission.CUSTOM_SYSTEM permission to work properly.

I still suspect that it might be an issue with the license activation, however I'll need a dumpstate to be sure.

Thanks,

Sam