Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The signapk.jar (all lowercase) file mentioned in <a href="https://stackoverflow.com/a/4257367/427545">aprock' answer</a> can be found at <code>prebuilts/sdk/tools/lib/signapk.jar</code> (or <code>out/host/linux-x86/framework/signapk.jar</code>).</p> <p>Below I will describe how to manage the keystore used by Eclipse and <code>ant release</code>.</p> <hr> <p>The following command takes the key file <strong>platform.pk8</strong> and X509 certificate <strong>platform.x509.pem</strong> and outputs the decrypted key material in <em>tmp.p12</em>. The name <strong>platformkey</strong> is used to </p> <pre> openssl pkcs8 -inform DER -nocrypt -in <b>platform.pk8</b> | \ openssl pkcs12 -export -in <b>platform.x509.pem</b> -inkey /dev/stdin \ -name <b>platformkey</b> -password pass: -out <i>tmp.p12</i> </pre> <p>Eclipse and <code>ant debug</code> use the keystore at <strong>~/.android/debug.keystore</strong> which is locked with the password <code>android</code>. (You can also specify an other keystore file if you want to, e.g. <code>~/.android/mykeys.keystore</code>.) The next command stores the key material from <em>tmp.p12</em> in the keystore (without a password for the keys, if you want one, edit <code>-srcstorepass ''</code> below):</p> <pre> keytool -importkeystore -deststorepass android -srckeystore <i>tmp.p12</i> \ -srcstoretype PKCS12 -srcstorepass '' -destkeystore <b>~/.android/debug.keystore</b> </pre> <p>At this point, you can delete the <em>tmp.p12</em> file because it is no longer needed.</p> <p>In order to check what is in your keystore, you can run the next <code>keytool</code> command (the output it shown on the line thereafter):</p> <pre> $ keytool -list -keystore <b>~/.android/debug.keystore</b> -storepass android ... <b>platformkey</b>, Nov 23, 2013, PrivateKeyEntry, Certificate fingerprint (SHA1): 12:34:56:(stripped):AB:CD:EF </pre> <p>When you no longer need the key, it can be removed with:</p> <pre> keytool -delete -keystore <b>~/.android/debug.keystore</b> -storepass android -alias <b>platformkey</b> </pre> <p>In your <code>local.properties</code> file, put (if you omit the <code>key.*.password</code> options, you have to enter it every time you sign the APK):</p> <pre><code>key.store=${user.home}/.android/debug.keystore key.alias=platformkey key.store.password=android key.alias.password= </code></pre> <p>Now you can run <code>ant release</code> to sign your APK using the platform key you stored in a keystore.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload