I'm signing an APK using a keystore whose password includes spaces, using jarsigner. I'm specifying -storepass and then putting the password in quotes, e.g. -storepass "my password 123".
The sign always goes wrong though, because the key hash is not what I expect it to be. This is crucial for automating the build of my Android app without any user input.