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 Goldwax
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 GoldwaxJan 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 Goldwax
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 Goldwax
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

Adrian Linca
Jun 21, 2018
4:54 am

Hi,

Did you find a solution to this issue?

I'm having the same problem when trying to use some KNOX APIs.

After activating the license cuccessfully I still get the error:

Admin  does not have com.samsung.android.knox.permission.KNOX_CUSTOM_SYSTEM OR com.sec.enterprise.knox.permission.CUSTOM_SYSTEM

In the logs I see those permissions are not granted after activating the license, but other permissions are granted, e.g. android.permission.sec.MDM_APP_MGMT, android.permission.sec.MDM_KIOSK_MODE.

The weird thing is that on some devices it works fine, on others it does not, same device model, same KNOX version, different results.

All devices are added to the new KC portal.

I appreciate any information on this.

Thanks,

Adrian Linca.

Comments

Hello Adrian,

What kind of license key are you using, and is it a production of development license?

Best regards,

Jenna

Jenna S.Jul 03, 2018 at 4:35 pm
Anthony Parkins
Jul 02, 2018
9:06 am

I'm also seeing a similar issue, even though the license successfully activates.

Specifically I'm trying to set the auto start on power:

CustomDeviceManager cdm = CustomDeviceManager.getInstance();
SystemManager kcsm = cdm.getSystemManager();
kcsm.setForceAutoStartUpState(1);

All other Knox APIs are working except this one. Most strangely it used to work before, the only difference being that I was using a dev license key and have now migrated to a production license key, but from a code point of view nothing has changed.

Comments

Hello Anthony,

What time of license are you using? To use customDeviceManager you need a production customization license. The SKL licenses will work for development, but for production you need the customization key. You can purchase a production customization key from a reseller.

Best regards,

Jenna

Jenna S.Jul 06, 2018 at 6:28 pm
Adrian Linca
Jul 04, 2018
9:52 am

Hello Jenna,

We are using Samsung Knox License (SKL) key, we tried both Development and Production keys without success.

We encountered this issue when migrating to the new Knox Portal, the thing is that the issue only happens on some devices, not on all.

 

BR,

Adrian