This document describes how to re-pack and re-sign the Android application for enterprise distribution. The iOS instructions can be found at Script for re-signing the Jive iOS app binary.
The customization/repack scripts (the script found here, as well as How To: Configure the Jive Android App For Enterprise Distribution) are only supported on OS X and Linux environments. If you are using Windows, our recommended workaround is to install Ubuntu Linux under a VM (VirtualBox is freely downloadable), install the Android SDK and APKtool, and finally use the attached scripts.
The following must be installed in your environment prior to proceeding:
- JDK 1.7 or later
- apktool: follow these directions to install, or on a Mac with Homebrew installed, simply "brew install apktool"
- apktool-2.0.0rc2.jar (Attached to this document. The latest official release, 1.5.2, doesn't work with APKs built with the latest Android SDK.)
- The Android SDK tools. Follow the directions at Installing the Android SDK | Android Developers and ensure the SDK tools are in your path.
The attached script allows for re-packing and re-signing the Android APK binary. After downloading, be sure to make it executable:
chmod +x signapk.bash
Simple Re-Signing (Customer Certificate Only, No Customizations)
If you don't need to perform any customizations (see How To: Configure the Jive Android App For Enterprise Distribution for details on customizations), you can re-sign the APK directly using this script. The usage of the script is as follows:
./signapk.bash <path-to-apk> <path-to-keystore-file> <keystore password> <key alias>
The script will generate a signed APK file, with "signed" prepended to the original input filename.
./signapk.bash jive-android-core.apk jive-customer.keystore android123 android
This will re-sign the APK file named
jive-android-core.apk using the key named android from the keystore
jive-customer.keystore, with password
android123. The resulting re-signed file will be named
signed_jive-android-core.apk. Replace the keystore, key alias, and password with values appropriate for your organization.
Re-Signing With Customizations
Before customizing, we recommend performing a "simple" re-signing process as described above to ensure you have the correct keystore and other parameters, and to verify that the resultant APK can be successfully installed to a device.
After you have made desired customizations as described in How To: Configure the Jive Android App For Enterprise Distribution, you will have a
custom_jive-android-core.apk directory instead of a file. Run the script with the path to the directory, instead of the file. For example:
./signapk.bash custom_jive-android-core.apk jive-customer.keystore android123 android
The resultant signed APK file will be named
signed_custom-jive-android-core.apk and will be suitable for installation on a device.