質問

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

他のヒント

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:

  1. open 'Passwords and Keys' (use super key and search 'password')
  2. filter results by 'android'
  3. look at each entry, they will be something like org.jetbrains.android...KeyPassowrdRequestor, and open each one up in turn
  4. 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!

Note that for recent versions of IntelliJ on MacOS, the passwords are (likely) stored in the Keychain by default.

This can be verified via Preferences/Appearance & Behaviour/System Settings/Passwords.

The corresponding entries can be found via searching the keychain for "IntelliJ Platform DB" where they are listed by uuid. The data sources for each uuid can be found in .idea/dataSources.xml

You can also recover database passwords. I found myself needing one a couple of times in the past. I am providing MacOS details here but the rest of the OS's are probably similar.

To recover these you need to go to the directory of the project where the database is setup, go inside the hidden .idea folder and search for the dataSources.xml file, in it you will find an uuid for each of the databases:

This UUID is what you need to search in the "Keychain Access" for.

Accessing saved database passwords for JetBrains products

I am accessing DataSource passwords for DataGrip but this should work for any JetBrains product like IntelliJ. The confusing part was that all information I could find specified that a Master Password was required to decrypt these passwords, but I never set a master password. You can actually decrypt your passwords by using a Master Password set afterwards.

Getting the passwords

  1. Open your JetBrain product's settings Password settings. Settings > Appearance & Behavior > System Settings > Passwords
  2. Your passwords should be saved in a .kdbx file (ex. C:/Users/<USER>/<JETBRAINS_PRODUCT>/config/c.kdbx)
  3. Select the 3 dots to the right of this file and set your master password (if it's already set then you can keep it)
  4. Open the .kdbx file with KeyPass, using the master password from before and you can copy your passwords directly to the clipboard, or reveal them with the default hotkey Ctrl + H

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top