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

Native Development

Reply
Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Cannot sign from command line with key created in NDK momentics IDE

[ Edited ]

 

EDIT NOTE:  This post may be totally wrong.  Check down below for updates.

 

TL:smileyvery-happy:R; Do NOT save your password in momentics if you want to sign via command line.

 

I believe that I have this figured out correctly now, but it has been driving me crazy.  I post here in case someone else has this problem.  I created my CSK and p12 files (registered for signing, in other words) from the NDK momentics IDE wizard, because that's easier than creating via command line.  Whenever I would try to sign a bar file from the command line (for example an APK file that I had converted to bar), it would tell me "incorrect keystore password", even though I am absolutely sure it's correct, because I would create new keys to try again.

 

The bottom line is that if you check the box "Save password (may trigger secure storage login)" in momentics when you create or register your keys, the password on the command line will be encrypted

 

I finally tried creating a .p12 certificate without saving the password in momentics' secure storage.  Then I did not get this error on the command line.  I did, however, get a similar error for the CSK password, so now I am waiting for new keys to try out a similar approach.

 

I would find it very helpful if the documentation were updated to reflect this.  In particular, I found this page, but it was of course unhelpful for my problem: 

https://developer.blackberry.com/native/documentation/com.qnx.doc.native_sdk.devguide/com.qnx.doc.na...

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Re: Cannot sign from command line with key created in NDK momentics IDE

Actually, it may be something else entirely.  My password has a '$' character in it, and I was not escaping that on the command line.

 

*forehead slap*

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm
BlackBerry Development Advisor (Retired)
mgoulet
Posts: 329
Registered: ‎05-07-2012
My Device: BB Alpha

Re: Cannot sign from command line with key created in NDK momentics IDE

Hi there,

 

That is odd. I gather from your second post that you have solved this issue?

 

Martin

Developer
cycletronic
Posts: 113
Registered: ‎03-23-2011
My Device: Playbook, Z10

Re: Cannot sign from command line with key created in NDK momentics IDE

I have mostly resolved it.  I have not gone back and checked that saved passwords in momentics can be used on the command line.  I may be able to check later today.  

 

I did successfully use passwords that are NOT saved in momentics, but created there, on the command line.  The main problem was that I had a '$' in the password, which is a special character on the linux command line.  To make it work, I had to put a backslash in front, like this: xxx\$xxx

 

So, if you have special characters in your password, be sure to remember to escape them.

----------------
WIP game: Melodaeum
My graphically bland but very useful Morse Code trainer: Speed CW
My graphically attractive but boring game: The Rainstorm