I forgot the password for my Android keystore, but it's saved in the Intellij IDEA password manager. I know the master password, so IDEA is able to auto complete the keystore password, but I can find no way to view or copy/paste the password from the text field.
Is there a plugin that can do that, maybe?
I've also tried to look for some logs or a shell, because I assume that behind the scenes IDEA is using the keytool
utility from the SDK, so maybe I can spot the password in the command line.
I've ran out of ideas. Please help.
EDIT: If anyone knows where the encrypted passwords are kept, I could back up the file and use it in future IDEA installations with the same master password. Would that work?
I've managed to understand the source code enough to put together a small utility program to decrypt the passwords in the security.xml file using the master password. https://github.com/corneliudascalu/intellij-decrypt
Having same problem, except I didn't set master password at all.
After research figure out, that password is lies in security.xml file, at .IntelliJIdea12/config/options filder. But it protected by AES ( at least seems so ).
-- edit --
Also see my comment below, where i've point to IDE source that handles password store and encryption
For anyone attempting keystore password recovery on more recent versions of Android Studio and Ubuntu, it seems that most documented suggestions to recover the password from logs, gradle, etc no longer work. Corneliu's excellent brute force script is great - unless you chose a 16 character password with no dictionary words in it and would like a result some time this month :) Using the Intellij security.xml solution is no longer available to retrieve saved passwords from Android Studio either.
However - having dug around a bit, Android Studio 3.1 seems to use the OS keychain in Ubuntu 18.04, so retrieving a saved keystore password is as simple as:
- open 'Passwords and Keys' (use super key and search 'password')
- filter results by 'android'
- look at each entry, they will be something like org.jetbrains.android...KeyPassowrdRequestor, and open each one up in turn
- expand the password dropdown and select 'Show password', it will look something like: KEY_STORE_PASSWORD__/home/pathto/keystore/keystore-name.jks@mycoolpassword
Find the keystore you're looking for and the bit after @ is your missing password. Hope that helps someone out there!
来源:https://stackoverflow.com/questions/21195321/intellij-idea-view-saved-password