Generating Keys

From Android Wiki

(Difference between revisions)
Jump to: navigation, searcha
(New page: When you publish an app on the market, you need to sign it with a personal private key. The typical way to generate the key is with keytool, and then sign it with jarsigner. But this is ge...)
m (fhtagn)
Line 1: Line 1:
-
When you publish an app on the market, you need to sign it with a personal private key. The typical way to generate the key is with keytool, and then sign it with jarsigner. But this is generally a pain ;)
+
fhtagn
-
 
+
-
The git source tree has a SignApk.jar utility that is easier to use to sign apks. You can use the following three steps to generate a key and certificate that can be used with SignApk.jar
+
-
 
+
-
<pre>
+
-
openssl genrsa -out key.pem 1024
+
-
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
+
-
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
+
-
</pre>
+
-
 
+
-
Then, you can sign an apk using the SignApk.jar tool and the key.pk8 and certificate.pem files you created
+
-
 
+
-
<pre>
+
-
java -jar SignApk.jar certificate.pem key.pk8 Application.apk Application_signed.apk
+
-
</pre>
+

Revision as of 21:25, 1 August 2009

fhtagn

Personal tools