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

Native Development

Reply
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

blackberry-signer gives me "error in opening zip file"

 

Hi,

 

I have recently moved from Momentics IDE to Qt Creator, so I need to configure signing from the command line. I'm following this guide:

http://developer.blackberry.com/native/documentation/core/com.qnx.doc.native_sdk.devguide/topic/conf...

I have downloaded BB ID token as suggested and now I try to run this command:

blackberry-signer -storepass KeystorePassword bbidtoken.csk

 It gives me:

"Error: error in opening zip file"

 

Which zip file is it talking about?

 


SQL Terminal – command-line interface to local SQLite database
BlackBerry Development Advisor
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: blackberry-signer gives me "error in opening zip file"

Hi ondrejandrej,

 

Try the following command instead, where the BAR_file.bar is the bar file you intend to sign and the KeysotrePassword is the password of your author.p12 file (your developer certificate).

 

blackberry-signer -storepass KeystorePassword BAR_file.bar

 

 

 

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Developer
Posts: 1,523
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: blackberry-signer gives me "error in opening zip file"

[ Edited ]

Hi,

 

I'm also using Qt Creator. Below is my deployment script, tweak the paths as needed:

 

package.sh

#!/bin/sh
source /Applications/bbndk/bbndk-env.sh
sed -e "s,%SRC_DIR%,../UnitConverter,g" bar-descriptor.xml > ../UnitConverter-build-BB10Device-Release/bar-descriptor.xml
cd ../UnitConverter-build-BB10Device-Release/
blackberry-nativepackager -package UnitConverter.bar -buildIdFile ../UnitConverter/buildId.txt -sign -storepass StorePassword bar-descriptor.xml

 

Put initial build number to buildId.txt (for example "1"). It will be autoincremented on each run of the script. This is optional. If not using build numbers, simply remove the -buildIdFile key.

 

Deploy process:

 

1) Delete Release build folder

2) Build the project in Release mode, but do not run it! (otherwise it will generate the .bar file with development mode enabled)

3) Run the deploy script. The script will:

 - Fix the paths in bar-descriptor.xml from tokens to real paths and will copy the file to build folder

 - Take the build number from buildId.txt and automatically increment it

 - Sign the bar file

 

 p.s. bar file is actually a zip file, it can be unzipped and inspected.

 


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: blackberry-signer gives me "error in opening zip file"

@sabdelsayed:

I tried that, I get:

Error: Key RDK is not registered

AFAIK I have to configure the singing before I can sign bar files, so this error message doesn't surprise me.

 


SQL Terminal – command-line interface to local SQLite database
BlackBerry Development Advisor
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: blackberry-signer gives me "error in opening zip file"

[ Edited ]

Hi again ondrejandrej,

 

Here are the steps to get your native environment setup for signing:

1) Create a BBID account here: http://blackberryid.blackberry.com

2) Create a BBID token (bbidtoken.csk) here: http://blackberryid.blackberry.com/bbid/login

3) Create a developer certificate (author.p12) using the blackberry-keytool command line tool or through the IDE.

 

CMD tool: http://developer.blackberry.com/native/documentation/core/com.qnx.doc.native_sdk.devguide/topic/conf...

http://developer.blackberry.com/native/documentation/core/com.qnx.doc.native_sdk.devguide/topic/conf...

IDE:

Window->Preferences->BlackBerry->Signing dialog box->under the “Developer Certificate” section

 

I think what you are missing is step 3.

 

Basically, for signing you need to have two files, the bbidtoken.csk file (BlackBerry ID token) and the author.p12 file (developer certificate).

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker
Developer
Posts: 89
Registered: ‎03-17-2013
My Device: Dev Alpha + Z10
My Carrier: I carry it myself.

Re: blackberry-signer gives me "error in opening zip file"

 

I should also note that we already have a published app in BB World and need to be able to update it (so far we used Momentics for development and for signing the .bar).

 

Anyway, I tried

blackberry-keytool -genkeypair -storepass <our passwd> -dname "cn=Our company"

 

That seems to have executed fine and generated author.p12 in ~/.rim

However, when I now run blackberry-signer, it gives me exactly the same errors as before.


SQL Terminal – command-line interface to local SQLite database
BlackBerry Development Advisor
Posts: 252
Registered: ‎08-17-2012
My Device: BlackBerry Z10 and Q10
My Carrier: Bell

Re: blackberry-signer gives me "error in opening zip file"

In that case you need to link your existing signing keys to your BBID account as described in this blog post:

http://devblog.blackberry.com/2013/08/code-signing-keys-be-gone-welcome-blackberry-id/ 

 

This will ensure that any bbidtoken.csk and author.p12 files associated with your account will be linked to your old signing information.

@SamarAbdelsayed

Did this answer your question? Please accept post as solution.
Please refrain from posting new questions in solved threads.
Found a bug? Report it using the Issue Tracker