Keystore: delete password
15,789
JKS keystores can't be used without a password. The best option is to pass your keystore password on the command line somehow - for example, instead of using the ADT to sign your files, trigger an ant
build like in this answer.
If you really want to have a passwordless keystore your only option is to write your own implementation of KeyStore
(although you still have to be able to tell your signing tools to use it) - see the Oracle documentation for more details.
Author by
kagali-san
Updated on June 04, 2022Comments
-
kagali-san almost 2 years
I have a keystore (keytool key storage), which is used for signing .apk's from Eclipse-ADT. Due to the extremely annoying password requests at each export, I'm trying to figure out how to avoid reentering password.
My current options are:
- by using Perl/X1::::XTEST, automate password entering (insecure)
- hack Eclipse to cache passwords (potentially insecure, explicit timeloss)
- remove keystore password, which seems to be the best possible idea
Attempt to set empty password failed:
>> keytool -keystore /work/X/googleplay.key -alias X -keypasswd Enter keystore password: New key password for <X>: Password is too short - must be at least 6 characters New key password for <X>: Password is too short - must be at least 6 characters New key password for <X>: Password is too short - must be at least 6 characters keytool error: java.lang.Exception: Too many failures - try later
-
Miloslav Raus almost 8 yearsWell, you can save / load JKS keystores without password. Using the java API, .store(<stream>, <empty char array>), and .open(<stream>, null). Of course, eclipse & other apps usually won't convert empty strings to null (so the load on their side will fail) - so you can use this mostly in yous own apps.