Intellij IDEA - view saved password

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.


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


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