Back to top

Congratulations! You have successfully implemented the Knox SDK into an app. This section covers how to compile and run the app.

Compile the app

Android Studio provides two ways to compile and test your app:

  1. On an Android Virtual Device (AVD).
  2. On a physical Samsung device.

The Knox SDK must be tested on a physical Knox supported device, as the Android studio emulator does not support Knox features.

  1. Plug your Samsung device into your computer.
  2. On your device, navigate to Settings > About device, then tap Build Number seven times to enable developer options.
  3. Tap Settings > Developer options > USB debugging to turn USB debugging on.
  4. In Android Studio, with your project open, click Run > Run ‘app’ (or Shift + F10).
  5. Under Connected Devices, choose your test device.

choose your test device

Use the app

  1. When the app launches, tap ACTIVATE ADMIN

  2. In the pop-up prompt, tap Activate.

  3. Tap ACTIVATE LICENSE. Agree to the Samsung Knox EULA.

  4. Tap ACTIVATE BACKWARDS COMPATIBLE KEY if needed.

  5. Tap SET CCM PROFILE. A dialog box appears, asking the user if they want to whitelist all the packages.
    If the user taps YES, the CCM profile is immediately set, as shown below.
    If the user taps NO, they are prompted to select the packages they want to whitelist, as shown below.

    whitelistPackagesPopup

    whitelistAllPackages

    choosePackagesPopup

  6. Tap GET CCM PROFILE to see the current CCM profile.

  7. Tap DELETE CCM PROFILE to delete the current CCM profile.

  8. Next, tap GET DEFAULT CERTIFICATE ALIAS to see the alias of the default certificate in the logview.

  9. Now, tap INSTALL CERTIFICATE to show the following configuration box:

    configureCertificatePopup

  10. Enter a certificate alias, select the required check boxes, and tap CONFIRM. Another dialog box appears, which prompts the user for a certificate path and password. Fill in the details and tap CONFIRM to install the certificate.

    setCertPopup

    setCCMProfile

  11. The user can delete the certificate by tapping DELETE CERTIFICATE, after which they are prompted to input the certificate alias.

    deleteCertificatePopup

    deleteCCMprofile

  12. Tap ADD PACKAGE TO EXEMPT LIST, REMOVE PACKAGE FROM EXEMPT LIST or IS CCM POLICY ENABLED FOR A PACKAGE. The following dialog boxes appear, asking the user to input a package name to add or remove from the exempt list, or check if the CCM policy is enabled for that package.

    addPackagePopup

    removePackagePopup

  13. Tap TOGGLE TIMA KEYSTORE to enable or disable the TIMA Keystore.

  14. Tap IS TIMA KEYSTORE ENABLED to see the TIMA Keystore’s status in the logview.

Uninstall the app

To uninstall an app with device administrator status, you must first deactivate its device admin privileges.

To deactivate device administrator for the app:

  1. Tap DEACTIVATE ADMIN.
  2. The app can now be uninstalled normally.

Tutorial progress

Congratulations! You’ve completed the tutorial.

Is this page helpful?