Andre Erwanto
Jan 09, 2019
5:21 pm

Upgrading WP to KNOX Workspace - java.lang.SecurityException: Profile is not a knox premium user 10 ContectInfo.uid 1010304

Hi,

I need an urgent help, I'm following tutorial in: https://seap.samsung.com/html-docs/android/Content/tutorial-upgrade-work...

to provision PO (success) then activate KPE (success) then upgrade PO to KNOX Workspace and try some KNOX policy.

I'm following the tutorial and all good until I try to: calling KNOX Policy --> in this case is set camera policy:

the high level process is like this:

  1. activate PO --> success
  2. Go to Work profile, and run the agent (the agent will be duplicated to work profile)
  3. activate KPE --> Success
  4. trigger / set camera policy
  5. Toggle container Camera --> failed
    it said "java.lang.SecurityException: Profile is not a knox premium user 10 ContectInfo.uid 1010304"

I'm running/Testing on: Note 9 (N960F) -- Build No: N960FXX2ARK3 -- Android 8.1.0 -- KNOX Version 3.2 -- KNOX API Level 26

What possibly went wrong here?

I share my overall code here: https://github.com/on3nx/Samsung-KNOX-KPE/tree/master/DOPO/DOPO

Please let me know where am I missed.

 

thank you and appreciate the helps!

Similar topics

No similar topics found.
Jay Himanshu Jha
Jan 17, 2019
2:11 am

Hi Andre,

You are seeing that error because your Android for Work profile needs to be upgraded to a Knox workspace before you can call setCameraEnabled() API. The profile is upgraded to Knox workspace when you activate a license. But in this case, there are two missing permissions preventing that from happening:

<uses-permission android:name="com.samsung.android.knox.permission.KNOX_APP_MGMT" />
<uses-permission android:name="com.samsung.android.knox.permission.KNOX_CONTAINER" />

Once you add this to your manifest file and rebuild your app, your workspace should be upgraded to a container when activating the license. 

Regards,

Jay

Mattia Pagini
Feb 06, 2019
4:17 pm

I had the same problem.
This is not documented in Step 6 of tutorial at this link: https://seap.samsung.com/html-docs/android/Content/tutorial-upgrade-work...

At the end only adding the permissions reported by Jay it worked fine

Comments

Hi Mattia,

Thank you for bringing this to our attention. We will update this guide to reflect the corrections Jay mentioned above. 

Best regards,

Mikayla

Mikayla N.Feb 06, 2019 at 5:14 pm