Samsung.Developer Qualys
Feb 12, 2019
2:26 pm

Getting SecurityException: Admin doesn't own container 12, while calling any Knox API for AFW device.

Hello 

 

We have tried to enroll Samsung J7Pro(OSV8.1.0 and Knox v3.2) device with Android for work (Profile Owner).

we have followed tutorial (https://seap.samsung.com/html-docs/android/Content/tutorial-upgrade-work...)

steps we have followed.

1 created managed profile.

2 once managed profile created, we have activated KLM Standard license. 

3 after activating license, we have tried to install application sliently (ApplicationPolicy#installApplication(String apkFilePath, boolean installOnSDCard))

 but we are getting below exception.

 

SecurityException: Admin doesn't own container 12 ContextInfo.uid 1210204

    java.lang.SecurityException: Admin doesn't own container 12 ContextInfo.uid 1210204

    

    Admin doesn't own container 12 ContextInfo.uid 1210204

    android.os.Parcel.readException(Parcel.java:2021)

    android.os.Parcel.readException(Parcel.java:1967)

    com.samsung.android.knox.application.IApplicationPolicy$Stub$Proxy.installApplication(IApplicationPolicy.java:3443)

    com.samsung.android.knox.application.ApplicationPolicy.installOrUpdateApplicationInternal(ApplicationPolicy.java:699)

    com.samsung.android.knox.application.ApplicationPolicy.installApplication(ApplicationPolicy.java:659)

    com.qualys.android.samsung.helper.InstallApplicationHelper.installApplication(InstallApplicationHelper.java:22)

    com.qualys.android.samsung.handler.EDMVersionHandler4_0_1.handleMessge(EDMVersionHandler4_0_1.java:78)

    com.qualys.android.samsung.service.ProfileInstaller.onHandleWork(ProfileInstaller.java:119)

    android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:391)

    android.support.v4.app.JobIntentService$CommandProcessor.doInBackground(JobIntentService.java:382)

    android.os.AsyncTask$2.call(AsyncTask.java:333)

    java.util.concurrent.FutureTask.run(FutureTask.java:266)

    java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)

    java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)

    java.lang.Thread.run(Thread.java:764)

 

 

also we want to know what is minimum supported knox version and android os version for enrolling samsung device in AFW.

can you please look into the issue?

 

Thanks

Mikayla N.Samsung SEAP Moderator
Feb 12, 2019
10:13 pm

Hi,

The issue you are experiencing is due to missing permissions from your Android manifest file. Unfortunately, these permissions are missing from our tutorial. We are in the process of updating our tutorial and those changes should be made shortly. Please add the following lines to your manifest file. 

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

As well, you will be unable to use any Knox APIs from within an Android for Work Profile until your workspace has been upgraded to a Knox Container, which is the process this tutorial is guiding you through. You will need to activate a Premium license to upgrade your profile to a container. Please make these changes and confirm with me if this solves your issues.

Best,

Mikayla

Updated: Feb 12, 2019 at 10:16 pm