title: I'm having trouble getting SHA1 certificate with keytool
body: <p>I'm trying to find the SHA1 hash of my signature key store on macos sierra using the following comand:</p>
  
  <pre><code>keytool -exportcert -alias androiddebugkey -keystore $HOME/.android/debug.keystore -list -v -storepass android
  </code></pre>
  
  <p>The result looks like below:</p>
  
  <blockquote>
    <p>Alias ​​name: androiddebugkey<br> Date of creation: Oct 25, 2017<br>
    Input Type: PrivateKeyEntry<br> Length of certificate chain: 1<br>
    Certificate [1]:<br> keytool error:
    java.util.IllegalFormatConversionException: d != java.lang.String
    java.util.IllegalFormatConversionException: d != java.lang.String     at
    java.base/java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4331)
      at
    java.base/java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2846)
      at
    java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:2800)
      at java.base/java.util.Formatter.format(Formatter.java:2581)    at
    java.base/java.util.Formatter.format(Formatter.java:2517)     at
    java.base/java.lang.String.format(String.java:2747)   at
    java.base/sun.security.tools.keytool.Main.withWeak(Main.java:3151)    at
    java.base/sun.security.tools.keytool.Main.printX509Cert(Main.java:3182)
      at
    java.base/sun.security.tools.keytool.Main.doPrintEntry(Main.java:1995)
      at
    java.base/sun.security.tools.keytool.Main.doCommands(Main.java:1212)
      at java.base/sun.security.tools.keytool.Main.run(Main.java:397)     at
    java.base/sun.security.tools.keytool.Main.main(Main.java:390)</p>
  </blockquote>
  
  <p>As far as I can see the command is working, it is not a problem with the file nor with password, it seems to me an internal error in java, is it missing some java package? I am using Java SDK 9.0.1</p>