Generate and update an MDX file

When an app is integrated with MAM SDK(MDX-enabled app), you do not have to create a wrapped APK with the MDX Toolkit. However, you must create an MDX file to upload on the Citrix Endpoint Management console.

The MDX file is created using the managed-app-utility.jar tool from the APK, using the switch “-appType sdkapp”.

The MDX file is essentially a zip file consisting of metadata that includes policies, icons, hashes, and other app-related metadata extracted from the APK so that Secure Hub can identify and verify the published app.

Note: It is imperative to use the same certificate that you signed your APK with when generating the MDX file.

  1. From the Citrix GitHub repo - (Click View Raw to download)

  2. From the MDX Toolkit - (Within the tools folder)

Generate an MDX File as part of the build process

MDX files are generated automatically as part of the build process. For more information about setting up the MDX file, see Setting up the library.

Manually generate an MDX file from an APK file

To manually generate the MDX file, run the following command in a CLI:

java -jar <path to file>/managed-app-utility.jar \
  wrap \
    -in ~/Desktop/SampleApps/Sample.apk \
    -out ~/Desktop/SampleApps/mdx/Sample.mdx \
    -appType     'sdkapp' \
    -storeUrl "https://play.google.com/store/apps/details?id=<sample.app.package.name>" \
    -keystore    "<keyStorePath>" \
    -storepass   "<keystorePassword>" \
    -keyalias    "<keyAlias>" \
    -keypass     "<keyPassword>"
<!--NeedCopy-->

Manually generate an MDX file from an AAB(.aab) file with the Google Play Signing certificate

Google has updated the Play Store requirements for new apps to use Android App Bundles starting August 2021. However, this requirement is not mandatory for Private Enterprise Applications. You can publish new private apps from the Play Console using either app bundles or APK files. When publishing apps through the Citrix Endpoint Management console, only the APK file format is accepted. This is because the Google Play private app iframe currently does not support the Android App Bundle format. For more information on publishing private apps, see Managed Google Play Help.

Android App Bundles require you to opt-in to Play App Signing. With Android App Bundles, the app no longer generates the APK for submission to the Play Store. Play App Signing removes the burden for you to safely manage your signing keys. However, if you choose to publish your app using an Android App Bundle, both the APK file and the signing key are required to generate the MDX file.

MAM SDK 21.7.0 introduced support for Play App Signing. When using a Google Play Store Signing certificate, use the -playappsigningcert switch to generate an MDX file. Download the Google Play Signing certificate from your Google console account and then point the new -playappsigningcert switch to its path. Any KeyStore related switches will be ignored and can be omitted.

If you are using an AAB file, you must extract the UNIVERSAL APK using bundletool.

To manually generate the MDX file, run the following command in a CLI:

java -jar <path to file>/managed-app-utility.jar \
  wrap \
    -in "~/Desktop/SampleApps/Sample.apk" \
    -out "~/Desktop/SampleApps/Sample.mdx" \
    -appType 'sdkapp' \
    -storeUrl "https://play.google.com/store/apps/details?id=<sample.app.package.name>" \
    -playappsigningcert "~/Desktop/deployment_cert.der"
<!--NeedCopy-->

Update an MDX file

You can update or modify the .mdx file that was generated during the build.

Sample code for updating the app name, description, excluded devices, minimum and maximum platform SDK versions:

java -jar <path to file>/managed-app-utility.jar \
  setinfo \
    -in ~/Desktop/SampleApps/Sample.mdx \
    -out ~/Desktop/SampleApps/mdx/Sample.mdx \
    -appName "App friendly name." \
    -appDesc "App description." \
    -excludedDevices    "List of disallowed hardware platforms." \
    -maxPlatform        "Maximum allowed SDK version." \
    -minPlatform        "Minimum allowed SDK version."
<!--NeedCopy-->
Generate and update an MDX file