summaryrefslogtreecommitdiff
path: root/src/help/studio_help/src/topics/t_app-cert-signing_android.dita
blob: 80b93488a2151f6e9dbb79ae90bbc630356245e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?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>
  <prolog>
    <metadata>
      <keywords>
        <!--<indexterm></indexterm>-->
      </keywords>
    </metadata>
  </prolog>
  <taskbody>
    <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>
    <steps>
      <step>
        <cmd>If necessary, open the Signing and Keys view by <ph product="webui android-studio">selecting <menucascade>
              <uicontrol>Window</uicontrol>
              <uicontrol>Show View</uicontrol>
              <uicontrol>Other</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>
      </step>
      <step>
        <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>
      </step>
      <step>
        <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>
      </step>
      <step>
        <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>
      </step>
      <step>
        <cmd>Using the <uicontrol>Key</uicontrol> drop-down list, specify the key to be used when signing the selected
          package(s).</cmd>
      </step>
      <step>
        <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>
      </step>
      <step>
        <cmd>Click <uicontrol>Finish</uicontrol>.</cmd>
      </step>
      <step>
        <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>
      </step>
    </steps>
    <result>The selected Android Package files are signed with the chosen key and then aligned on 4-byte boundaries
      using the zipalign tool.</result>
  </taskbody>
</task>