How to Sign OTA Files for Blackberry? - blackberry

How do I sign blackberry files in the OTAInstaller folder? I am using phone gap and I have a
\build\OTAInstall folder that contains 1 jar file and a whole lot of .cod files.
How do I sign those cod files?
I followed this tutorial on how to setup signing but I don't know how actually run it to sign.

After following the steps within that tutorial go to...
https://build.phonegap.com/people/edit#pane=signing
Then add BlackBerry Signing key to Phonegap
CSK file and DB file can be found at
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5\bin
sigtool.csk
sigtool.db
Set BlackBerry Signing Keys as default, run build again.
This is what my signing page looks like after setting a key as default.

Go in your command line to the /bin dir of the webworks sdk, for example
C:\Program Files (x86)\Research In Motion\BlackBerry WebWorks SDK 2.3.1.5\bin
then run the signature tool:
java -jar SignatureTool.jar
open any of your .cod files and use 'request signature', it will sign both your standard and otainstall files
make sure to run the tool with java 6, not java 7, it crashes on the later

Related

Phonegap + Blackberry webworks : ant build not generating standardinstall.zip

I am trying to build a BlackBerry 7 and earlier project that uses the WebWorks SDK using Phonegap 2.9; but the build doesn't generate the StandardInstall.zip file as it's supposed to.
The project I'm trying to build is the example app found in the Phonegap 2.9 download (phonegap-2.9.0\lib\blackberry\bbos\example).
I followed the instructions in the Phonegap documentation and there is an overview of my environment:
My OS is Windows XP, I've got JDK, ANT and BlackBerry device manager installed. I've also installed the BlackBerry Webworks SDK and I've setup my Signing Keys (sigtool.csk and sigtool.db are in the bin folder of the webworks installation).
I also updated the project.properties file as explained in the documentation.
When I try to build the app, It doesn't print any error message, but the OTAInstall and StandardInstall folders are not generated (all I get is the zipped application folder and a widget folder).
I also tried deploying to simulator and to device, the errors thrown confirm just that the build step doesn't generate the files it should.
Screenshots: http://i.stack.imgur.com/XpN4M.png
Solutions I already tried:
JDK version problem
I downgraded JDK to 1.6.0_30 version (it seems that the Webworks SDK doesn't work with upper versions); but it didn't change anything.
White spaces
I also tried to avoid white spaces in paths like advised in other posts but it doesn't work:
C:
├ \ant
├ \java
└ \webworks
I don't know what else to do, any help would be much appreciated !
To make a blackberry phonegap project, the things you need are:
Phonegap (cordova libs)
BlackBerry WebWorks SDK
Ant, through which you will build your project.(Also add 'ANT' in you environment variables).
The steps to create a phonegap build:
Open the phonegap sample that came with it. Follow the location -
phonegap-2.3.0\lib\blackberry\sample
Copy cordova folder as you see the sample folder
Copy lib and www folder also. The lib folder contains the cordova library. The www folder is the only place for your files.
It contains your html, css, js and the config.xml
Copy blackberry.xml, build.xml and project.properties files.(change the properties in these files as per your project configurations)
'Build' folder is created once you run the script 'ant blackberry build'(To build the project) or 'ant blackberry load-simulator'(Build and run on simulator) or 'ant blackberry load-device'
Once you have built the project you can run it on device using the .cod files.
When you run the above build scripts you get the build folder in your PhonegapBlackberry project which looks like:
Setting the correct Java jdk home path in bbwp.properties file of my <BlackBerry SDK>/bin folder works for me.
Thanks,
prodeveloper.

Blackberry 10 Webworks SDK command line generate build with package and signing

So I already was able to build the .bar file, but now I want to build the .bar file to be sent to the store with the package and signing.
So far I've tried this.
bbwp C:\xampp\htdocs\maddash\packaged\maddash.zip -g (password) -b 1.0.0 -o C:\xampp\htdocs\maddash\packaged\
and my error is..
failed to find signing key file
Did you register your keys from RIM and put them in the default location (%HOMEPATH%\Local Settings\Application Data\Research In Motion for Windows)
Did you update your SDK? Then check your keys in bbwp\bin and rename sigtool to author and move your file to the default location.
If not sufficient, try installing the native IDE and use the UI for managing the keys in the preferences
My personal opinion about this problem.
First. If you have your signing key, great for you, because BB changed the system of signing apps. (Now they use BBtokenID, related with your BBID and, in this moment, the webworks framework is the only one that doesn't support this tokens) (Come on, Hip, Hip, Hurrah! :P).
According to your command, one comment
bbwp C:\xampp\htdocs\maddash\packaged\maddash.zip -g (password) -b 1.0.0 -o C:\xampp\htdocs\maddash\packaged\
In the first paramenter yoy must add the FOLDER of your source code, not your zipped code.
If you have your keys where it corresponds, it will generate a bar file signed.
NOW, you must package it in a zip file. If you need more help with that, tell me :)

How to install .cod file of blackberry in blackberry device

I want to tell my blackberry app in blackberry device. I searched and found that you have to place .cod, .jad and .alx file and then download and install the .jad file in the device. I did this but it said Class net.rim.device.api.command.Command not found.
I think I have to add more files or what should I do?
Thanks!
If you created this cod file , than before installing it on Blackberry Device you need to Signed it first.
See this video how to sign .
http://supportforums.blackberry.com/t5/Java-Development/Deploying-and-Signing-Applications-in-the-BlackBerry-JDE-Plug-in/ta-p/446877
Once you sign your cod file , you can install it on BB phone by .COD file or by .JAD file.
If you want to install using .JAD file , copy your .COD file into SDCARD & .JAD too. Remember if you have more than 60KB .COD file size than you need to extract it to divide into 60KB Sizes(Use 7 Zip to extract) & put in same folder as in .jad File & open .Jad file from Phone & Follow the icstruction.
If you want to install by .COD File , than you may have used BB Eclipse Env.
GOTO
<installed Eclipse folder>/plugins\net.rim.ejde.componentpack<SDK Ver>\components\bin
& paste your cod file in bin folder. Now open COmmand prompt point to this folder & use this command before it connect your BB Phone by USB to computer
JavaLoader load <cod file name>
Follow this link for more guidance
http://www.bbgeeks.com/blackberry-guides/blackberry-guide-how-to-install-third-party-applications-onto-your-blackberry-88400/
cod files with alx file are for desktop installation via usb-cable. Launch BB Desktop Manager, specify alx file and BB Desktop Manager will install cod files (described in alx-file) to the connected device.
cod files and jad file are for wireless installation. Device opens jad file in browser, and downloads and installs all cod files described in jad file.
That's it.

Packaging a BlackBerry (WebWorks) PhoneGap/Cordova application

I'm working with PhoneGap/Cordova and the only options I see is to build to the emulator or to build for debuging to the device.
I want to package the app for further distribution and publishing. Any thoughts?
Thanks!!
First build with
ant blackberry build
Then, you need to get and install signing keys:
https://developer.blackberry.com/html5/documentation/signing_setup_smartphone_apps_1920010_11.html
Then finally, once you are able to code sign you need to use bbwp to sign and package the zip file generated by the build (the zip is in the build directory of the PhoneGap folder). So navigate to your sdk/bin directory and run:
bbwp C:\myapp\HelloWorld.zip -g mypassword -o C:\myapp\signed
This generates two folders in C:\myapp\signed which contain the signed files. You will need different files depending on the distribution method and a summary is here:
https://developer.blackberry.com/html5/documentation/distributing_your_app_1866990_11.html
https://developer.blackberry.com/html5/documentation/signing_landing_page.html
https://developer.blackberry.com/html5/documentation/distributing_your_app_1866990_11.html
You need to get a signing key from RIM in order to publish your apps to the Blackberry App World. My previous experiences was packaging the app with signing key and allow others to install the app with BlackBerry Desktop Manager using the .alx file generated.
cd into the top level directory of your project (the one that contains the www/ folder). Then call this command:
ant TARGET build
Where TARGET can be blackberry, playbook, or qnx (beta right now). This will create a build/ folder which should contain the needed files for further packaging.

Issues in signing the .COD file

I am facing issues in signing the .COD file for my Application.
Few days back, I installed the Signature key files on my machine which I received from the Blackberry support. Signature Key files were successfully installed on my machine.
Now, I want to sign my .COD file again as my .COD files have been updated. But, I am getting the following error, when I try to sign the .COD file.
The Private key could not be found.
This program requires a private key for signing all transaction between this server and the signing authority server.
The private key is contained in the sigtool.csk file which was not found.
Expected location : C:\Program Files\Research In Motion\BlackBerry JDE 5.0.0\bin\sigtool.csk
Would you like to create a new key pair file.
Well, I can not create a new key pair file as it is not allowed.
i think in your system more than one jde or jde plugin is installed.go to bin directory of jde or eclipse plugin check for sigtool.csk.if its present, right click on signaturetool.jar and select "java platform se binary", one window will appear here browse your application.cod file and request for signature.

Resources