Muhammad Usman Riaz
Feb 10, 2018
3:51 pm

Knox License Activation on Note 10.1 (GT-N8010 - Android 4.1.2.16)

Hi,

I am trying to activate Knox Standard SDK license on Note 10.1 (GT-N8010 - Android 4.1.2.16). I need to setup device with the email configuration, once the license is activated. I am getting the following exception

java.lang.RuntimeException: Stub!
at android.app.enterprise.license.EnterpriseLicenseManager.getInstance(EnterpriseLicenseManager.java:5)

The same call to getInstance works on Android 4.4 and 5 devices. As suggested by the guide to activate, I am including libs as compile only

provided files('libs/license.jar')
provided files('libs/edm.jar')

Please let me know, what needs to be done to successfully activate the Knox license?

Thanks!

Similar topics

No similar topics found.
David Shah
Feb 11, 2018
1:28 pm

Hi Muhammad,

You might want to have a look at this Knox android sdk license activation guide: https://seap.samsung.com/sdk/knox-android

David Shah
Tutuapp

Muhammad Usman Riaz
Feb 11, 2018
3:58 pm

Thanks for the reply.

I have tried using the new Knox SDK. Since the note 10.1 is API level 16, it seems I have to include supportlib.jar. This is how I am doing 

provided files('libs/knoxsdk.jar')
apk files('libs/supportlib.jar')

I can sync the project fine, but when I try to run the app, I am getting the following error. Including just the knoxsdk.jar works (compiles/deploys fine), but knoxsdk.jar only support devices with API level 24 or up. And I have a requirement to support API level 16+.

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

Any idea what could be wrong here?

Thanks!

Comments

Hi Muhammad, try adding 

multiDexEnabled true

to the android/defaultConfig section of the project's build.gradle file. Thanks!

Samuel GoldwaxFeb 13, 2018 at 5:43 pm
Muhammad Usman Riaz
Feb 14, 2018
1:36 am

Thanks, Samuel. I have tried that already and the build fails with a different error :(

Any idea how to resolve these multiple definitions of the same class?

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/samsung/android/knox/net/firewall/FirewallRule;
Error:com.android.dex.DexException: Multiple dex files define Lcom/samsung/android/knox/net/firewall/FirewallRule;
Error: at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)
Error: at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)
Error: at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)
Error: at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Error: at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
Error: at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)
Error: at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
Error: at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
Error: at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
Error: at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
Error: at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
Error: at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error:Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/samsung/android/knox/net/firewall/FirewallRule;
Samuel Goldwax
Feb 14, 2018
5:57 pm

Hi Muhammad,

You could also try toggling minifyEnabled in the same gradle file. Sometimes simply running a clean build of the project also resolves this.

Thanks,

Sam

Comments

Hi Sam,

I tried what you've suggested and it didnt help. Getting the same exception, I did a clean/rebuild as well. 

Is there any Samsung sample project, that includes both of these files and can be successfully build & deployed? All the samples I could find were of newer API 21 or higher I believe.

Thanks,

Usman.

Muhammad Usman RiazFeb 15, 2018 at 3:43 pm
Fever 108
Jun 30, 2018
5:40 am

I attempted what you've recommended and it didnt help. Getting a similar exemption, I completed a clean/reconstruct also. wifikill for pc

Comments

Hello,

What exactly is the issue that you are getting? We have a sample backwards compatability app and migration guide that may be helpful. 

Best regards,

Jenna

Jenna SlomowitzJul 11, 2018 at 5:10 pm
Top Doze
Jul 11, 2018
10:08 am

Post Deleted

Our content monitors have determined that this post violated our terms of service.

Please ensure your posts comply with our forum guidelines. We are committed to providing helpful and professional information in this space.

Thank you,

The SEAP team

Deleted Jul 11, 2018 4:16 pm

Frankq Dotman
Sep 07, 2018
3:47 am

Post Deleted

Our content monitors have determined that this post violated our terms of service.

Please ensure your posts comply with our forum guidelines. We are committed to providing helpful and professional information in this space.

Thank you,

The SEAP team

Deleted Sep 07, 2018 5:40 pm