title: Retrieve Private Key for Existing Android App
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/11715621/lost-my-keystore-for-uploaded-app-on-android-market">Lost my keystore for uploaded app on android market</a>  </p>
  </blockquote>
  
  
  
  <p>I'm pushing a new version of an Android app to the Google Play Store and I want it to trigger an update for the current users of the app and not treat it as a new version.  I don't have the private key that was originally used to sign the existing app, so I'm trying the following to recover it. </p>
  
  <p>I'm able to get to step 3, but I'm unsure what the .keystore file name is for the keytool -list -keystore my-signing-key.keystore command, any ideas?</p>
  
  <ol>
  <li>First, unzip the APK and extract the file /META-INF/ANDROID_.RSA
  (this file may also be CERT.RSA, but there should only be one .RSA
  file).</li>
  <li><p>Then issue this command:</p>
  
  <p>keytool -printcert -file ANDROID_.RSA You will get certificate
  fingerprints like this:</p>
  
  <p>MD5:  B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB
   SHA1: 16:59:E7:E3:0C:AA:7A:0D:F2:0D:05:20:12:A8:85:0B:32:C5:4F:68
   Signature algorithm name: SHA1withRSA</p></li>
  <li><p>Then use the keytool again to print out all the aliases of your
  signing keystore:</p>
  
  <p>keytool -list -keystore my-signing-key.keystore</p></li>
  </ol>
  
  <p>You will get a list of aliases and their certificate fingerprint:</p>
  
  <pre><code>android_key, Jan 23, 2010, PrivateKeyEntry,
  Certificate fingerprint (MD5): B3:4F:BE:07:AA:78:24:DC:CA:92:36:FF:AE:8C:17:DB
  </code></pre>
  
  <p>Voila! we can now determined the apk has been signed with this keystore, and with the alias 'android_key'.</p>