08-29-2012 02:03 AM - edited 08-29-2012 11:53 AM
EDIT NOTE: This post may be totally wrong. Check down below for updates.
TL
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:
08-29-2012 10:00 AM
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*
08-29-2012 11:20 AM
Hi there,
That is odd. I gather from your second post that you have solved this issue?
Martin
08-29-2012 11:47 AM
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.