Chirag Savsani
Jul 15, 2019
7:15 am

Admin does not have android.permission.sec.MDM_APP_MGMT OR com.samsung.android.knox.permission.KNOX_APP_MGMT

I got this exception Admin does not have android.permission.sec.MDM_APP_MGMT OR com.samsung.android.knox.permission.KNOX_APP_MGMT even if I have added those permissions in my AndroidManifest.xml file.

I am activating license key and backward compatible key. Both keys are activated successfully.  But after that when I try to use disable apps using below code

public static boolean disableAppInstall(boolean disable, Context mContext) {

    EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(mContext);
    ApplicationPolicy appPolicy = edm.getApplicationPolicy();
    try {
        boolean result;
        if (disable) {
            result = appPolicy.setApplicationInstallationMode(ApplicationPolicy.
                    APPLICATION_INSTALLATION_MODE_DISALLOW);
        } else {
            result = appPolicy.setApplicationInstallationMode(ApplicationPolicy.
                    APPLICATION_INSTALLATION_MODE_ALLOW);
        }
        return result;
    } catch (SecurityException e) {
        Log.w(TAG, "SecurityException: " + e);
        return false;
    }
}

 

I am getting Admin  does not have android.permission.sec.MDM_APP_MGMT OR com.samsung.android.knox.permission.KNOX_APP_MGMT exception.

How can I resolve the above issue?

Similar topics

No similar topics found.
Chirag Savsani
Jul 15, 2019
9:00 am

I found the issue.

This issue arrised because I have KPE development Limited key not KPE Development.

So How can I generate KPE developemnt key for the testing purpose?

Comments

Hi Chirag,

In order to generate a full development key, you need to be a partner. You can apply for a partner account here.

Best regards,

Mikayla

Mikayla NeufeldJul 22, 2019 at 6:05 pm