Installing and Configuring the Citrix MDX Toolkit Build 2.2.1 v372 and Wrapping Apps

After installing and configuring the App Controller 2.9 it is time to start with application wrapping. With application wrapping you sign the application and convert/save it to an MDX file. You can upload both APK (Android) and IPA (iOS) as MDX files to the XenMobile App Controller, but with MDX files you have the additional ability to configure policies and to run the application in a sandbox.

You can wrap the applications with the Citrix MDX Toolkit . Keep in mind that this MDX Toolkit only runs on Mac OS X Lion or higher and not on a Windows machine.

In this blog I will show you how to prepare and how to wrap applications with the MDX Toolkit.

Preperations

General;

For Android;

For iOS;

Installing Java SE Development Kit 7 for Mac OS

installing-and-configuring-citrix-mdx-toolkit-001

Double click the jdk-7u51-macosx-x64.dmg file

installing-and-configuring-citrix-mdx-toolkit-002

Double click on JDK 7 Update 51.pkg

installing-and-configuring-citrix-mdx-toolkit-003

Click on Continue

installing-and-configuring-citrix-mdx-toolkit-004

Click on Install

installing-and-configuring-citrix-mdx-toolkit-005

Click on Close

Installing the Android SDK Platform Tools

installing-and-configuring-citrix-mdx-toolkit-006

Go to the downloaded Android Software Development Kit and browse to adt-bundle-mac-x86_64-20131030 > sdk > tools and double click the android application

installing-and-configuring-citrix-mdx-toolkit-007

Click on Open

installing-and-configuring-citrix-mdx-toolkit-009

Make sure you select the following Tools;

 – Android SDK Tools Rev. 22.3
– Android SDK Platform-tools Rev. 19
– Android SDK Built-tools Rev. 18.0.1
– Android SDK Built-tools Rev. 17

Click on Install <x> packages.

installing-and-configuring-citrix-mdx-toolkit-010

On the left side select Android SDK License, on the right side select Accept License and click Install.

After the installation close the dialog boxes (3).

Installing the Android APK Tool

installing-and-configuring-citrix-mdx-toolkit-011

Double click the apktool-install-macosx-r05-ibot.tar.bz2 and the apktool1.5.2.tar.bz2 file to uncompressed the files.

installing-and-configuring-citrix-mdx-toolkit-012

Copy the following files to adt-bundle-mac-x86_64-20131030 > sdk > tools ;

–          Apktool-install-macosx-r05-ibot > aapt
–          Apktool-install-macosx-r05-ibot > apktool
–          Apktool1.5.2 > apktool.jar

installing-and-configuring-citrix-mdx-toolkit-013

To add the folders to the path variable, open Terminal and type the following command;

~/.bash_profile; open ~/.bash_profile

installing-and-configuring-citrix-mdx-toolkit-014

Add the following lines to the file;

Export PATH=”$HOME/Downloads/adt-bundle-mac-x86_64-20131030/sdk/platform-tools:$PATH”
Export PATH=”$HOME/Downloads/adt-bundle-mac-x86_64-20131030/sdk/build-tools:$PATH”
Export PATH=”$HOME/Downloads/adt-bundle-mac-x86_64-20131030/sdk/tools:$PATH”

installing-and-configuring-citrix-mdx-toolkit-015

Click File > Save a Version, and close the dialog box

installing-and-configuring-citrix-mdx-toolkit-016

To create the keystore key run the following command;

Keytool –genkey –keyalg DSA –alias <keystorename>.keystore –storepass <any-password> -keysize 1024

 NOTE: The key must have a 1024 bit keysize and a DSA key algorithm

installing-and-configuring-citrix-mdx-toolkit-017

Enter your first and last name

installing-and-configuring-citrix-mdx-toolkit-018

Enter the name of your organizational unit

installing-and-configuring-citrix-mdx-toolkit-019

Enter the name of your organization

installing-and-configuring-citrix-mdx-toolkit-020

Enter the name of your City or Locality

installing-and-configuring-citrix-mdx-toolkit-021

Enter the name of your State or Province

installing-and-configuring-citrix-mdx-toolkit-022

Enter the two-letter country code for this unit

installing-and-configuring-citrix-mdx-toolkit-023

If everything is correct, type Yes

installing-and-configuring-citrix-mdx-toolkit-024

Enter a key password

installing-and-configuring-citrix-mdx-toolkit-024b

Run the following command to copy the keystore file to the downloads folder;

cp .keystore Downloads/<keystorename>.keystore

Install the Command Line Tools for Xcode

installing-and-configuring-xcodetools-001

Double click the xcode462_cltools_10_76938260a.dmg file

installing-and-configuring-xcodetools-002

Double click Command Line Tools (Lion).mpkg

installing-and-configuring-xcodetools-003

Click Continue

installing-and-configuring-xcodetools-004

Click Continue

installing-and-configuring-xcodetools-005

Click Agree

installing-and-configuring-xcodetools-006

Click Install

installing-and-configuring-xcodetools-007

Click Close

Install the Citrix MDX Toolkit

installing-and-configuring-citrix-mdx-toolkit-025Double click the MDXToolkit.mpkg file

installing-and-configuring-citrix-mdx-toolkit-026

Click Continue

installing-and-configuring-citrix-mdx-toolkit-027

Click Continue

installing-and-configuring-citrix-mdx-toolkit-028

Click Agree

installing-and-configuring-citrix-mdx-toolkit-029

Click Install

installing-and-configuring-citrix-mdx-toolkit-030

Click Close

Wrapping an application

For this example I will wrap WorxMail for Android. The steps to wrap an iOS application are almost the same. The only difference is that you must select an IPA file instead of an APK file and that you have to specify a iOS Distribution Provisioning Profile and iOS Distribution Certificate instead of the Android SDK and the Keystore.

installing-and-configuring-citrix-mdx-toolkit-031

Start the MDX Toolkit

installing-and-configuring-citrix-mdx-toolkit-032

Select For IT administrator and click Next

installing-and-configuring-citrix-mdx-toolkit-033

Browse to the APK file and click Next

installing-and-configuring-citrix-mdx-toolkit-034

You have to provide the path to the top-level of the Android SDK the first time you wrap an Android application. Click Browse

installing-and-configuring-citrix-mdx-toolkit-035

Select the adt-bundle-mac-x86_64-20131030 > sdk folder and click Open

installing-and-configuring-citrix-mdx-toolkit-036

Click Next

installing-and-configuring-citrix-mdx-toolkit-037

Click Next

installing-and-configuring-citrix-mdx-toolkit-038

Browse to the keystore file created in the previous steps and click Next

installing-and-configuring-citrix-mdx-toolkit-039

Enter the password you entered while creating the key and click Next

installing-and-configuring-citrix-mdx-toolkit-040

Click Create

installing-and-configuring-citrix-mdx-toolkit-041

Enter the alias password you entered while creating the key and click Create

installing-and-configuring-citrix-mdx-toolkit-042

Give the MDX file a name you want and click Create

installing-and-configuring-citrix-mdx-toolkit-043

Click Finish

21 comments

  • Hi
    I am not a MAC user normally and I hit a few hurdles with these instructions. May be useful to others:-
    – Open messes with the double quote character and writes to .bash_profile the wrong character (although it looks like double quotes) Us vi to edit this file instead.
    – Cut and paste of the key tool syntax results in an error that keygen is invalid option. If you cut and paste from the web replace the dashes with dashes as these are a different character also.

    Other than that Thanks to RobinHobo for these instructions. The Citrix Doco is pretty poor on this.

    AD

  • Hi,

    Great Post really helping us out.

    We are hitting a bit of a snag it seems when we create the Bash_profile file and adding the Export Paths you have yours pointing from $HOME/Downloads we created a directory in $HOME/Documents and created a file structure Android/SDK-Platform/adt…

    when we save the file we can no longer open Bash_Profile using command open /.bash_profile of which turns out to be a permission denied error, is there a reason why you use Downloads and why we can not use another directory? is it possible?

    • I used the downloads folder because on that location was the SDK, you can use any other location that you want.

  • Has anyone had issues after wrapping apps for Android that they will only install on Android 4.3 or 4.4 but not on anything older on 4.x.x
    The application starts to download but then errors out stating WorxHome could not connect and it never installs?

  • In the beginning under preparations, it is mentioned to Download apktool1.6.2.tar.bz2 for Android but apktool1.5.2.tar.bz2 is only available. I presume it was a typo as the other steps guide to install 1.5.2.

  • I succeeded to wrap IPA files.

    Unfortunately, wrapping the APK files didn’t work.
    I get in the MDX toolkit empty fields in the section Verify App Details.
    Of course I filled in these empty fields, but then MDX toolkit freezes.

  • Hi Marcel, have the same problem. Even with the latest version of the MDX Toolkit (except the freezing). Have you update you Mac with the latest updates? Are you using the latest MDX Toolkit?

    • Having the same problem. Mac OS X 10.10 is freshly installed, using all the prerequisites described in http://support.citrix.com/article/CTX140458 i am still having the same problem.

      We are using the following versions:
      OS X Yosemite 10.10.1
      Android SDK Build-tools 21.1.2 (even tried different build-tools versions)
      MDX Toolkit 10
      All APK files are having the same problem.

      • Solved! The android_settings.txt wasn’t complete.

        The working one:

        PATH = /users/username/Downloads/Install/android-sdk-macosx/platform-tools:/users/username/Downloads/Install/android-sdk-macosx/build-tools/21.1.2:/users/username/Downloads/Install/android-sdk-macosx/tools

  • Is this article still relevant for wrapping iOS and Android Worx apps for XenMobile 10.x?

  • Nice article, thanks!
    I followed it but I got an error when wrapping an app:
    ###Analyzing app…
    ————————————————————————-
    Using package-specific policies.
    I: Generating new resources
    I: Creating a new R.java
    Unexpected error occurred: String index out of range: -1

    I checked /Applications/Citrix/MDXToolkit/android_settings.txt and it points to the correct paths.
    Any ideas/suggestions/directions??
    Thanks in advance.

    • Hi Alejandro,

      Had this same problems some time ago. Updating the Android SDK and edit the android_settings paths to the latest builds solved my problem.

      Regards,

      Robin

About Robin Hobo

I work as a Senior Solution Architect with focus on the Modern Workspace. I am specialized in Azure Virtual Desktop (AVD), Windows 365 and Microsoft EM+S (including Microsoft Endpoint Manager - Microsoft Intune).

For my full bio, check the About Me page.

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close