Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® World™ Development

Reply
New Contributor
Posts: 6
Registered: ‎05-22-2013
My Device: Developer
My Carrier: Developer
Accepted Solution

I can't upload application to BlackBerry World due to umlatus in application name.

Hello,

 

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.

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: I can't upload application to BlackBerry World due to umlatus in application name.

Do you receive any errors in the output of bundling/signing?

Is your BAR file fully signed?

How to verify your BAR file is fully signed - BlackBerry Support Community Forums

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 6
Registered: ‎05-22-2013
My Device: Developer
My Carrier: Developer

Re: I can't upload application to BlackBerry World due to umlatus in application name.

No, I didn't receive any errors during repackaging or signing.

 

META-INF folder in BAR file contains files:

 

AUTHOR.EC

AUTHOR.SF

MANIFEST.MF

RDK.EC

RDK.SF

 

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.

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: I can't upload application to BlackBerry World due to umlatus in application name.

The bar-descriptor.xml file, which includes the application name, does not support non-ASCII characters. Which in particular are you trying to use?

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 6
Registered: ‎05-22-2013
My Device: Developer
My Carrier: Developer

Re: I can't upload application to BlackBerry World due to umlatus in application name.

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.

 

Highlighted
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: I can't upload application to BlackBerry World due to umlatus in application name.

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:

 

Default only:

<name>VanillaAppName</name>

 

With non-ASCII

<name>
VanillaAppName
<text xml:lang="en">VanillaAppName with special U &#xfc;</text>
</name>

 

So it will take a few lines to add the name after the BAR has been compiled, then re-sign and deploy.

Garett
@garettBeuk
--
Goodbye everybody!
New Contributor
Posts: 6
Registered: ‎05-22-2013
My Device: Developer
My Carrier: Developer

Re: I can't upload application to BlackBerry World due to umlatus in application name.

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:

android/<application name>.apk
android/res/drawable-mdpi/application_icon.png
META-INF/MANIFEST.MF

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:

android/<application name>.apk
android/res/drawable-mdpi/application_icon.png
META-INF/AUTHOR.EC
META-INF/AUTHOR.SF
META-INF/MANIFEST.MF
META-INF/RDK.EC
META-INF/RDK.SF

 

Retired
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: I can't upload application to BlackBerry World due to umlatus in application name.

Hey there,

 

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.

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
New Contributor
Posts: 6
Registered: ‎05-22-2013
My Device: Developer
My Carrier: Developer

Re: I can't upload application to BlackBerry World due to umlatus in application name.

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:

android/<application name>.APK
META-INF/MANIFEST.MF

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

   and:

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.

 

That's it.

 

Retired
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: I can't upload application to BlackBerry World due to umlatus in application name.

That's awesome! I completely forgot about unicode escape sequences. I should try this myself.

 

Thanks for the great forum post Smiley Happy

 

    Justin

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com