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

Adobe AIR Development

Reply
New Contributor
Posts: 8
Registered: ‎07-22-2011
My Device: PlayBook
My Carrier: N/A
Accepted Solution

Restore signing keys without barsigner.db

Hello all,

 

I wish to restore signing keys that I had backed up, like explained in the following article:

 

http://supportforums.blackberry.com/t5/Testing-and-Deployment/Backup-and-Restore-BlackBerry-Code-Sig...

 

I had saved my .p12 file and barsigner.csk but lost barsigner.db. Does anyone know if I can regenerate barsigner.db?

 

I opened a different barsigner.db and noticed it's a small readable text file that looks fairly straightforward, if you can't regenerate them through RIM is there some magic people know of for writing your own?

 

Thanks supportforms peeps!

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Restore signing keys without barsigner.db

It should totally be reproducible, if you know your vendor id or customer id number. I don't recall where else that might be stored or shown, but you might want to look for it. I'll have to wait till after dinner to post details though... maybe someone else will get to it first.

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Highlighted
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Restore signing keys without barsigner.db

[ Edited ]

Here's the template for a barsigner.db file that has recorded the info from registering both a regular csj and a debug token csj file.  Obviously the client id is not my own:

#Do not edit manually.  Generated automatically by RIM tools.
#Sun May 01 17:37:32 EDT 2011
RDK=1234567890http\\://www.rim.net/Websigner/servlet/RDK-Waterloo
PBDT=1234567890http\\://www.rim.net/Websigner/servlet/PBDT-Waterloo

Note these items:

 

1. CR/LF terminated lines, all four, at least on Windows

2. no spaces in the last two lines even though it looks like there should be

3. it's remotely possible the date/time has to match a timestamp somewhere else... but it's very unlikely

4. if you never registered a debug token, just remove the last line... I remember that's how it looked at first for me.

 

Lastly, if you don't know offhand what your client number is, you should look through your emails for the one with a subject line like this: "Successful Registration Request for Client '1234567890'" and use that number.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
New Contributor
Posts: 8
Registered: ‎07-22-2011
My Device: PlayBook
My Carrier: N/A

Re: Restore signing keys without barsigner.db

Peter, you're incredible! Thanks so much! I'll try it out and let you know how I do. 

RIM, people like Peter are keeping your development community thriving and active. You should reward them!

 

Thanks again,

Developer
Posts: 45
Registered: ‎01-14-2011
My Device: Not Specified

Re: Restore signing keys without barsigner.db

Thanks peter, you got me out of a hole with the details for recreating the barsigner.db.

 

One erratum, for me when I used Peter's suggestion, the RDK signing would give me an "error:null" at the end of the process.

 

However changing the double \\ to a single \ in the barsigner.db worked for me e.g.

 

#Do not edit manually.  Generated automatically by RIM tools.
#Sun May 01 17:37:32 EDT 2011
RDK=123456789http\://www.rim.net/Websigner/servlet/RDK-Waterloo
PBDT=123456789http\://www.rim.net/Websigner/servlet/PBDT-Waterloo

App now signed and waiting on RIM for review!

Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Restore signing keys without barsigner.db

[ Edited ]

RufusA, quite correct. At least with the current version of the tools, the double backslash is not there in my files either.

I have no idea if it was really there originally, or if some glitch caused them to appear there. Maybe I manually re-entered the text and just screwed it up. I'll edit the post... thanks for the catch.  Edit: correction, I won't edit it.  I forgot that in this forum we can edit things only within 24 hours after posting it.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!