views:

140

answers:

2

I've downloaded and compile Android 2.1 version with signed-google_ion-ota-14721.zip image for my HTC phone. The compile completed successfully and so the system image flash. How can I sign my own Android application with the system signature?

Can someone describe the whole process for signing a user application with system signature as I am completely new with signing process.

Thank you in advance.

A: 

It is really easy using the wizard.

From http://developer.android.com/guide/publishing/app-signing.html

Compile and sign with Eclipse ADT
If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed .apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows you to sign the package using a GUI instead of performing the manual procedures to compile, sign, and align, as discussed above. Once the wizard has compiled and signed your package, it will also perfom package alignment with zipalign. Because the Export Wizard uses both Keytool and Jarsigner, you should ensure that they are accessible on your computer, as described above in the Basic Setup for Signing.

To create a signed and aligned .apk in Eclipse:

Select the project in the Package Explorer and select File > Export. Open the Android folder, select Export Android Application, and click Next. The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key). Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.

Biff MaGriff
Thank you for your replies but this is not what I'm asking. I don't just want to sign my applications. I want to sign them with the `system signature` that I just compiled. Someone could also help if he knew where are the system signatures are located during system.img compilation and how can I use the same signature for my application. I want to do all this because I need my application to have system permissions in order to perform some device tests.
Michalis
+2  A: 

Finally I managed to discover a way to sign my application with the platform signature. You need to use keys located in /build/target/product/security/ and add android:sharedUserId="android.uid.system" in your AndroidManifest.xml file.

For more details see http://groups.google.com/group/Android-DevPhone-Updating/tree/browse_frm/month/2010-04?_done=/group/Android-DevPhone-Updating/browse_frm/month/2010-04?&&pli=1

Michalis
You can accept your own answer to signalize that you've found a solution for this problem. ;)
Octavian Damiean

related questions