Android 中的code sign

Android 中和ios中都有code sign。它们的目的一样,都是要保证程序的可靠性,最基本实现原理也一样。但是sign的过程比较不同。

下面记录一点Android sign的重要知识。

请参看Android 官方文档,Signing Your Applications,http://developer.android.com/tools/publishing/app-signing.html

 

1.

The certificate does not need to be signed by a certificate authority: it is perfectly allowable, and typical, for Android applications to use self-signed certificates.

这点和ios不同,ios必须使用苹果这个certificate authority发布的certificate 才行!

2.

  • 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.

3.

The Android build process signs your application differently depending on which build mode you use to build your application. There are two build modes:debug mode and release mode

同ios一样,有2中签名方式,分别为了debug和release。debug时,使用系统自动生成的certificate进行sign。ios系统是不能自动生成certificate的,所以你要去去官网生成。

 

posted @ 2013-11-28 14:06  幻化成疯  阅读(449)  评论(0编辑  收藏  举报