Using the AEM Mobile Signing Tool For Android

When it comes to testing your Adobe Experience Manager mobile app, the preflight app is a great tool available to download directly onto an Android or IOS device. The app lets you test functionality, style, and overall experience. The problem with the preflight app is the fact there is certain functionality that you can’t see. We had a client that wanted a language selection screen the first time the app was opened and have it save the data, remembering the language subsequently after. For this situation, we needed a way to test the app as if it were published, being able to open and close it to see if it was saving the language properly—specifically on Android Devices. Fortunately AEM mobile portal offers a way to download your app to test it directly on an Android device. The problem we ran into was even though we had changed the settings on our Android devices to allow 3rd party applications, we kept seeing the following error- ‘Parse error there was a problem parsing the package‘, preventing us from installing the app.

We researched this a bit and found out it could have been several things, to combat this the solution that made the most sense was to sign the APK. We later found out that AEM has a tool to sign apps and decided to give it a try. After researching the documentation, we found it to be a simple process that fixed our issue and enabled us to test our app as if it were live. Let’s walk through the steps on how to use the AEM Mobile Signing Tool for Android.

First, download and install the Signing tool from the Adobe Experience Manager mobile portal. The link to download it is on the top right corner in the app section; it does not have a label saying it is the signing tool nonetheless, is in the shape of a cloud with a down arrow.

Once you have downloaded the signing tool, you will need a p12 certificate to sign with. To create a p12 on a Mac open Terminal and change to the directory that you wish to place your certificate.

Then paste in the following: keytool -genkey -v -keystore demo.key.p12 -alias alias_name -keyalg RSA -keysize 2048 -storetype pkcs12 -validity 10000. You can change the name of your certificate to whatever you would like, for this example; I named mine demo.

After this, you will be prompted to type in a password for your certificate. This will be the same password you use for the AEM Mobile Signing tool.

Once you have typed in your password, you will be prompted to enter in some information, after which you will need to verify its correct by typing in yes, or no.

Once you have entered yes your certificate will generate in the folder you have chosen. If you did not choose a specific folder, it will be in your User folder.

AEM offers some great documentation with more details about creating a p12 certificate and how to create one for windows here:

After you have your certificate, you are ready to use the signing tool. Download your APK from the AEM mobile portal by clicking on the unsigned app link in the app section.

Then open up the AEM Mobile Signing tool and select the Android tab.

Click on select application to choose your unsigned APK you downloaded from the portal.

Then click on select certificate to choose the p12 certificate you created earlier.

After this, all you need to do is type in the password you created with your certificate and click sign application.

If everything was filled out correctly, you will see a prompt that your APK has been signed.

After pressing ok, you will see that the signed APK was generated in the same folder as the unsigned APK.

At this point you can transfer you signed APK to your Android device. If you are on a PC, you can just connect a USB cable and copy the APK to your device. For Mac, you can download this file transfer tool to transfer the APK. Once it is on the device, you can go to the file explorer and install the application.

Overall the AEM Mobile Signing Tool is essential for Adobe Experience Manager Mobile app development and even proved useful for us in this situation outside of the final stages of app completion.