blob: 80b93488a2151f6e9dbb79ae90bbc630356245e5 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE task
PUBLIC "-//OASIS//DTD DITA Task//EN" "../dtd/task.dtd">
<task xml:lang="en-us" id="t_app-cert-signing">
<title>Signing Android packages</title>
<shortdesc>Once you have a keystore with at least one key pair, you can use that key to sign your Android packages
(APKs). You generally will sign your applications as you package them, but occasionally you will need to sign an
Android Package (APK) file that has already been created (for instance, if you need to change the certificate with
which an APK file is signed, you can remove the signature and then apply a new one as described here).</shortdesc>
<prereq>Note that this procedure requires that you have an Android Package (APK) file for each application being
signed. As well, the key must already be known to MOTODEV Studio for Android.</prereq>
<cmd>If necessary, open the Signing and Keys view by <ph product="webui android-studio">selecting <menucascade>
<uicontrol>Show View</uicontrol>
</menucascade> and then selecting <menucascade>
<uicontrol>MOTODEV Studio</uicontrol>
<uicontrol>Signing and Keys</uicontrol>
</menucascade> from the list of views</ph>. Note that this view is part of the MOTODEV Studio for Android
perspective and is thus normally opened when you switch to that perspective.</cmd>
<cmd>In the Signing and Keys view click <image href="../images/PackageSign.png" placement="inline"/> (Sign
Android Package).</cmd>
<stepresult>The Package Signing dialog appears.</stepresult>
<cmd>Using the <uicontrol>Packages folder</uicontrol> field, specify the folder that contains the APK files
(there can be more than one) to be signed. This is often the <codeph>dist</codeph> directory within an Android
application's project.</cmd>
<cmd>Specify the keystore containing the key to use for signing, and enter the keystore password if necessary.
Note that if you instructed MOTODEV Studio to save the keystore password when you created the keystore (or
during a previous signing operation), the password is filled in for you.</cmd>
<cmd>Using the <uicontrol>Key</uicontrol> drop-down list, specify the key to be used when signing the selected
<cmd>Under <uicontrol>Select the packages</uicontrol>, select the APK files that are to be signed with the
specified key. Note that the listed packages are those found in the folder you specified earlier.</cmd>
<cmd>Click <uicontrol>Finish</uicontrol>.</cmd>
<cmd>If you did not instruct MOTODEV Studio to save the selected key's password (either when you created the key
or during a previous signing operation), you will be prompted to enter the password for the key. Enter it in
the field provided and then click <uicontrol>OK</uicontrol>.</cmd>
<result>The selected Android Package files are signed with the chosen key and then aligned on 4-byte boundaries
using the zipalign tool.</result>