Mobile Development

Automated Blackberry sign tool (Mac, Linux & Windows)

There is a way to get Blackberry to be built and signed, on Mac, Linux & Windows. Heres how:

BB Ant tools

Need I say more? Well for the most part no, these tools work exactly like described. All you need is the JDE bin and lib folders, and the ant tasks for bb-ant-tools.

However if you need to get the signing tool to work, there is a little bit of info you need to know:

The signing tool looks for 2 files: sigtool.csk and sigtool.db
These must be in the bin folder for the JDE, alongside the SignatureTool.jar.
If your on windows, this works fine. If your on mac or linux, this doesn’t. Why? Because the SignatureTool is stupid.

It looks for the files like this: “..\bin\sigtool.csk”. So on anything that doesn’t use \ for dir seperators, this doesn’t work. You can trick it though, by making a softlink:

% ln -s bin/sigtool.csk bin\\sigtool.csk
% ln -s bin/sigtool.db bin\\sigtool.db

The signature tool now finds the files, yay!

Most people think the signature tools are restricted to your machine. However they are not. The csk and db file can be put on any machine, and the signatureTool will work. Be careful you don’t distribute your registration files though, because thats what RIM use to trace a malicious application.

For our development, I have put the JDE’s bin and lib folder into our subversion repository. So all developers can sign and build without needing to install the JDE, and it doesn’t matter what OS they are running either :)

Hope this is useful to someone, because theres not much info out there on BlackBerry development on other OS.

Comments

Comment from JiGGaK
Time: August 7, 2008, 12:20 am

There is a way to *fix* the signature tool:
http://www.slashdev.ca/2008/03/16/using-sigtool-in-linux/

And the latest beta version of JDE 4.6.0 comes with a non-broken signature tool:
http://na.blackberry.com/eng/developers/devbeta.jsp#tab_tab_jde

Comment from Dave Mitchell
Time: August 7, 2008, 8:00 am

Ah nice work, thanks for the info! :-)

Comment from sam
Time: October 23, 2008, 9:57 pm

Hi,

I am facing a trouble with signing keys. I have vista home premium on my development machine with JDE 4.2.0, JDE 4.2.1 and JDE 4.7.1 installed.

My project is configured and being developed in JDE 4.2.1 only. When I got keys from RIM, I double clicked the first .csi file. As this was the first time I am signing Blackberry app on this machine, I was asked to first create the missing csk files, so the two step process was carried out BUT it by default was done in JDE 4.7.1\bin directory and then I did registered all three .csi files successfully.

I didn’t attempted to sign my application because it is in JDE 4.2.1, so I had to copy the sigtool.csh, sigtool.db and sigtool.set files to my JDE 4.2.1\bin directory.

Here is the problem, I dont see the three files in my JDE 4.7.1\bin directory.

Can anybody tell me where the hell these files gone, even after registration of all three .csi files.

I did tried to search using default search tool in Windows Vista Home Premium, but the files are found no where. Somebody just told me that it may be because I am not having the admin previliges, but thats not true, I have all the rights on my system.. I suppose. Do I?

Please help me in anyway you can.

Thanks in Advance.

Comment from Dave Mitchell
Time: October 24, 2008, 9:23 am

I think the sigtool.csh, sigtool.db and sigtool.set files are auto created by the sigtool?

Comment from Cay Horstmann
Time: November 30, 2008, 6:07 pm

With JDE 4.6.0 at least, you need not have anything but SignatureTool.jar on your Linux machine for doing code signing. And if you want to do code signing on a headless server, try xvfb-run.

xvfb-run java -jar SignatureTool.jar -a -C -p secret foo.cod

Write a comment

* required fields

*

*


*