05-22-2013 10:45 AM
I have Android application (.apk bundle). Application name contains umlauts. I'm trying to convert .apk bundle to .bar (BlackBerry 10). I'm using BlackBerry Repackaging Tool Plug-in for Eclipse.
After repackaging and signing process application name in MANIFEST.MF file in .bar bundle contains '?' signs inseat of umlauts. I can't upload the .bar bundle to BlackBerry World due to this. When I'm trying to upload it I'm getting the error: "Invalid signature file digest for Manifest main attributes System.exit calls not allowed!"
Thanks in advance.
Solved! Go to Solution.
05-27-2013 02:00 PM
Do you receive any errors in the output of bundling/signing?
Is your BAR file fully signed?
05-27-2013 02:50 PM
No, I didn't receive any errors during repackaging or signing.
META-INF folder in BAR file contains files:
So, it seems, BAR should be fully signed. But when I run:
blackberry-signer -verify <BAR_File>.bar
I receive error:
Error: Invalid signature file digest for Manifest.
I tried next thing: I removed umlauts from application name, did bundling and signing and uploaded it to vendor portal with no errors. Storefront accepted it.
But removing umlauts is not an option because they are part of company/brand name.
05-27-2013 03:22 PM
The bar-descriptor.xml file, which includes the application name, does not support non-ASCII characters. Which in particular are you trying to use?
05-28-2013 02:56 AM
I'm trying to use umlaut: ü (u with diaeresis)
Also, I have no bar-descriptor.xml. I have only APK (Android application bundle). I'm using apk2bar utility to convert the APK to BAR. Then I'm using blackberry-signer utility to sign the BAR.
05-28-2013 10:45 AM
The bar-descriptor.xml file is created for you when you compile your Android app, opne the .BAR file to see.
Non-ASCII characters are not supported in the default app name, however you can add entries to the bar-descriptor with non-ASCII characters for specific languages. Example:
<text xml:lang="en">VanillaAppName with special U ü</text>
So it will take a few lines to add the name after the BAR has been compiled, then re-sign and deploy.
05-28-2013 03:41 PM
I'm sorry, but as I've said I have no bar-descriptor.xml in BAR bundle.
See, I have APK file, it's Android application which is ready to use. First, I use apk2bar utility:
apk2bar <path to my .apk file> <path to Android SDK>
As a result I have BAR file with these files inside:
Second, I use blackberry-signer utility:
blackberry-signer -storepass <my p12/CSK password> <path to my .bar file>
As a result I have BAR file with these files inside:
05-31-2013 01:22 PM
It looks like there is a bug in the Android tools that causes this to occur.
I have checked with the devs and have been reassured that a fix will be coming in the next iteration of the tools.
06-07-2013 01:51 PM
I guess I found the solution.
Let's say we have an Android application (.APK) with umlauts in its name, for example: "App für BlackBerry". If we want successfully convert it to BlackBerry application (.BAR), sign it and upload to BlackBerry World then we have to do next things:
1. Replace umlauts in application name with unicode escape sequences in AndroidManifest.xml file of our Android project. So, we will have "App f\u00FCr BlackBerry". Build our application (this will create .APK file).
2. Use apk2bar utility to convert .APK to .BAR (this will create .BAR file in same folder as our .APK file):
apk2bar <path to our .APK file> <path to Android SDK>
3. Change file extension of our .BAR file to .ZIP (or add .ZIP after .BAR). Unzip file with any archive manager. We should see next files in the archive folder:
We need to open META-INF/MANIFEST.MF file and check "Application-Name" and "Entry-Point-Name" lines. If they looks like:
Application-Name: App für BlackBerry
Entry-Point-Name: App für BlackBerry
then we need to copy MANIFEST.MF file to the same folder as our .APK file and replace umlauts in those lines with unicode escape sequences:
Application-Name: App f\u00FCr BlackBerry
Entry-Point-Name: App f\u00FCr BlackBerry
After this step we can remove .ZIP file and unziped folder.
4. Use apk2bar utility again with additional option:
apk2bar <path to our .APK file> <path to Android SDK> -m <path to our updated MANIFEST.MF file>
After this step we will have .BAR file with unicode escape sequences instead of umlauts in inner MANIFEST.MF file.
Caution: Don't update inner MANIFEST.MF file, zip unziped folder and change archive extensions from .ZIP back to .BAR. It may corrupt .BAR file. So it was for me.
5. Sign our .BAR file with blackberry-signer utility.
5.1. If our p12 and CSK passwords are the same then we could use:
blackberry-signer -storepass <our P12/CSK password> <path to our .BAR file>
5.2. If our p12 and CSK passwords aren't the same then we should use:
blackberry-signer -keystore <path to our .P12 file> -storepass <our P12 password> <path to our .BAR file> author
blackberry-signer -verbose -cskpass <our CSK password> -keystore <path to our lP12 file> -storepass <our P12 password> <path to our .BAR file> RDK
6. Verify our .BAR file:
blackberry-signer -verify <path to our .BAR file>
If this command shows no error then we can upload .BAR file to BlackBerry World.
06-07-2013 03:35 PM
That's awesome! I completely forgot about unicode escape sequences. I should try this myself.
Thanks for the great forum post