Game Development Reference
In-Depth Information
What is the two-letter country code for this unit?
[Unknown]: RU
Is CN=Sergey Kosarevsky, OU=SD, O=Linderdaum, L=St.Petersburg,
ST=Kolpino, C=RU correct?
[no]: yes
Generating 2048 bit RSA key pair and self-signed certificate
(SHA1withRSA) with a validity of 10000 days
for: CN=Sergey Kosarevsky, OU=SD, O=Linderdaum, L=St.Petersburg,
ST=Kolpino, C=RU
Enter key password for <alias_name>
(RETURN if same as keystore password):
[Storing my-release-key.keystore]
Now we are ready to proceed with the actual application signing. Use the jarsigner tool
from the JDK through the following code:
>jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my-
release-key.keystore bin\App2-release-unsigned.apk alias_name
This command is interactive, and it will require the user to enter the keystore password and
the key password. However, we can provide passwords in a batch ile in the following way:
>jarsigner -verbose -sigalg MD5withRSA -digestalg SHA1 -keystore my-
release-key.keystore -storepass 123456 -keypass 123456 bin\App2-release-
unsigned.apk alias_name
Passwords should match what you entered while creating your release key and keystore.
There is one more step left before we can safely publish our .apk package on Google Play.
Android applications can access uncompressed content within .apk using mmap() calls. Yet,
mmap() may imply some alignment restrictions on the underlying data. We need to align all
uncompressed data within .apk on 4-byte boundaries. Android SDK has the zipalign tool
to do it, as seen in the following command:
>zipalign -v 4 bin\App2-release-unsigned.apk App2-release.apk
Now our .apk is ready to be published.
See also
F Chapter 2 , Porting Common Libraries
 
Search WWH ::




Custom Search