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

Testing and Deployment

How to sign your BAR file from the command-line

by Retired on ‎04-05-2011 03:46 PM - edited on ‎03-21-2012 01:42 PM by Retired (17,544 Views)

Description

 

The signing of Adobe® AIR® applications created using the BlackBerry® Tablet OS SDK Plug-in for Adobe® Flash Builder® is supported from within the GUI since release 0.9.4 of the SDK. Still, you may find reasons why signing from the command-line is desirable. These applications are compiled into .bar archives, and before installed to a device they must be signed in 2 ways:

 

Using a Single Command

 

If the Developer Certificate (P12) and the RIM-Issued RDK were both created using the same password and reside in the default directory (listed here) then you can sign your .BAR file using the following single call:

 

blackberry-signer -storepass <your p12/CSK password> <BAR_file.bar>

 Otherwise you can sign with each key individually:

 

The Developer Certificate

 

 

blackberry-signer -keystore <your P12 file> -storepass <your p12 file password> <BAR_file.bar> author

 

 

The RIM-issued RDK Key

 

 

blackberry-signer -verbose -cskpass <your CSK password> -keystore <your P12 file> -storepass <your P12 file password> <BAR_file.bar> RDK

 

The above variables refer to:

 

  • <your P12 file> - the name of your developer certificate file
  • <your P12 file password> - the password spoecified when creating your P12 file
  • <BAR_file.bar> - the .bar file you are signing
  • <your CSK password> - the password specified when registering your RIM®-issued RDK file

 

 

The blackberry-signer command comes from a BAT file located in the \bin directory of the SDK install.

 

You can verify that your application is signed based on the command-line output or by checking the contents of the .bar file.

 

A list of common error messages and their resolutions can be found here.

 

NOTE: For BlackBerry® WebWorks™ applications created for the BlackBerry® PlayBook™ tablet you will need to use the BlackBerry WebWorks applicaiton-specific command-line calls to package the ZIP file into a BAR and sign:

 

 

bbwp "C:\myarchive.zip" -gcsk mycskpassword -gp12 myp12password -buildId 10 -o "C:\myoutputdir"

The reason is that the BlackBerry® WebWorks™ Packager currently produces BAR files in 1 of 2 ways: unsigned and in debug mode (which cannot be signed) or fully signed in release mode. As there is no way currently to create the BAR in release mode without signing, the above bbwp call must be used to both compile and sign the BlackBerry WebWorks BAR file.

Comments
by Developer
on ‎08-24-2013 01:50 AM

Very useful and updated informaiton. Thankyou

Users Online
Currently online: 32 members 1,018 guests
Please welcome our newest community members: