It’s Friday night and I finally found the answer to the last part of my SignatureTool.jar problem. See this post here that I will shamelessly inline for the fear of losing it to a random blog crash or deletion. The wonderful developers at Rim have never developed on Linux or Mac before. So they use backslashes in their path references! In short the post to download the ClassEditor software to poke around and change the values in the constant pool. (Get ClassEditor here then continue with the rest of the instructions.)
extract it, and run it with the command:
java -jar ce.jarOpen two class files extracted earlier: q.class and ad.class. ClassEditor will look something like this:
screenshot-classeditor-0.png
ClassEditor with q.class and ad.classStart with q.class and select the Constant Pool tab. In this file we need to change string constants containing just a single backslash character. There are actually two constants in the pool but the first is just a reference to the second. The string we want is at index 223.
screenshot-classeditor-1.png
String constant at index 223By default ClassEditor starts in read only mode so click the bright green Modify Mode(Off) button in the top right. The fields in the details area are now editable. Simply change the forward slash to a backslash and click Modify. Click save and that’s it for q.class!
screenshot-classeditor-2.png
String constant 223 modifiedSelect ad.class on left and locate constant 117, again in the Constant Pool tab.
screenshot-classeditor-3.png
String constant at index 117Change the value from \sigtool.set to /sigtool.set and click Modify. Click save and that’s it for ad.class.
screenshot-classeditor-4.png
String constant 117 modified
Repack SignatureTool.jar and testTo repack SignatureTool.jar just cd to the temporary directory where you extracted the jar and rejar the class files
cd ~/lib/RIM43/bin/tmp
jar -cmf META-INF/MANIFEST.MF ../SignatureTool.jar *Go up one directory and remove the temp directory
cd ..
rm -rf tmpTo test that everything worked, just run the command
java -jar SignatureTool.jarIf should prompt you to locate a cod file. Just cancel this and click the Properties button in the main signature tool window. If you see a list of Registered Signers it worked!
I followed the above with my copy of the SignatureTool.jar from the 4.2.x JDE and it worked flawlessly. After patching the SignatureTool.jar I repackaged it with the signature.csk signature.db and signatuer.set files and deployed it to our internal repo. The plugin I was working on now works without problems. I wanna stay up and work on this a little longer. I think I’ll put this post up on Monday.

[...] how to fix that EmptyStackException in your XML transform. Or maybe you’re trying to run Blackberry compilers on your MacPro and you keep getting verification errors. Or maybe you just Googled my name and landed here by [...]
By: iPhone Boot Camp « Can’t see nothing but the source code on March 31, 2009
at 8:01 am