There are 3 ways to this recover your lost keystore password:
If you have your logs intact, then you can find the password in the
Android Studio log files : Go to ~/Library/Logs -> AndroidStudio
->idea.log.1 and search for Search for "Pandroid.injected.signing.key.password" and you can see the key
password.
You can retrieve the password from the in your .gradle directory.
Look in .gradle\2.4\taskArtifacts\taskArtifacts.bin. This doesn't
seem to work for newer versions of Gradle (2.10 and above).
Use AndroidKeystoreBrute to guess or bruteforce your password as per
Alex Kutsko's answer above.
Solution link