title: java.io.IOException: Invalid keystore format / Unrecognized keystore format. Please load it with a specified type, when using an old android keystore
body: <p>I tried to sign an old Android application with Android Studio 4.0.1 (which I successfully signed say, 1 year ago) and it seems the keystore cannot be open anymore.
  I checked the credentials carefully but I don't think it comes from that.
  I also checked the various answers with &quot;Invalid keystore format&quot; on the Internet but get no luck here.</p>
  <p>The android JRE raises this error:</p>
  <pre><code>$ /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/bin/keytool -list -keystore android.keystore -v
  erreur keytool : java.io.IOException: Invalid keystore format
  java.io.IOException: Invalid keystore format
      at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:663)
      at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:56)
      at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:224)
      at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeyStore.java:70)
      at java.security.KeyStore.load(KeyStore.java:1445)
      at sun.security.tools.keytool.Main.doCommands(Main.java:823)
      at sun.security.tools.keytool.Main.run(Main.java:366)
      at sun.security.tools.keytool.Main.main(Main.java:359)
  
  $ /Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home/jre/bin/java -version
  openjdk version &quot;1.8.0_242-release&quot;
  OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
  OpenJDK 64-Bit Server VM (build 25.242-b3-6222593, mixed mode)
  </code></pre>
  <p>It is quite the same message with the OS one:</p>
  <pre><code>$ keytool -list -keystore android.keystore -v
  keytool error: java.security.KeyStoreException: Unrecognized keystore format. Please load it with a specified type
  java.security.KeyStoreException: Unrecognized keystore format. Please load it with a specified type
      at java.base/java.security.KeyStore.getInstance(KeyStore.java:1809)
      at java.base/java.security.KeyStore.getInstance(KeyStore.java:1680)
      at java.base/sun.security.tools.keytool.Main.doCommands(Main.java:936)
      at java.base/sun.security.tools.keytool.Main.run(Main.java:417)
      at java.base/sun.security.tools.keytool.Main.main(Main.java:410)
  
  $ java --version
  openjdk 14.0.2 2020-07-14
  OpenJDK Runtime Environment (build 14.0.2+12-46)
  OpenJDK 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing)
  </code></pre>
  <p>I think I have already met this issue in the past and had to revert to an older version of the JRE to keep on opening my keystore properly (solution I am currently trying now).</p>
  <ul>
  <li>Is this a question of default algorithm that changed between versions? If yes, how can I check my keystore is still valid and that I use a correct algorithm (since I did not create it unfortunately)?</li>
  <li>Do I need to migrate the keystore somehow?</li>
  </ul>