Tuesday, 14 January 2014

[KEY : SIGNED, UNSIGNED, SINGED AND UNSIGNED APK]

Why signed and unsigned apk.

First of all be clear about signed and unsigned apk. Signed apks keeps its digital signature certificate with it, while unsigned does not. The Android system requires that all installed applications be digitally signed with a certificate whose private key is held by the application's developer. The Android system uses the certificate as a means of identifying the author of an application and establishing trust relationships between applications.

As I guess unsigned apk is for facilitate another user to sign apk with its own key.
Remember the following points.

  • All applications must be signed. The system will not install an application on an emulator or a device if it is not signed.
  • To test and debug your application, the build tools sign your application with a special debug key that is created by the Android SDK build tools.
  • When you are ready to release your application for end-users, you must sign it with a suitable private key. You cannot publish an application that is signed with the debug key generated by the SDK tools.
  • You can use self-signed certificates to sign your applications. No certificate authority is needed.

More detail here

Signing the unsigned apk.
  1. Make sure you have unsigned apk or create it (Open menifest file-> click on Export on Unsigned apk).
  2. Keep your unsigned apk in separate folder.
  3. Find the path of you key.
  4. Open Command Prompt.
  5. jarsigner -verbose -keystore path/of/your/key path/of/your/unsignedApk alias_name_of_key
  6. Key will ask password
  7. Done