[Android]Generating Keys
(转载一个文章,不做解释)
From:http://android-dls.com/wiki/index.php?title=Generating_Keys
When publishing an app for everyone to use, be it with a custom ROM or on the Android market, you need to sign the .apk with a personal private key. The old way of doing this was to use keytool and then sign it with jarsigner, but the way detailed below is a lot easier for most people and uses a standard toolset that should be available on almost any operating system.
One tool for signing .apk is a utility aptly named "SignApk.jar", which is just about the easiest way to sign .apk files. SignApk.jar comes with some test keys, but it's generally advised that you generate your own. The steps below can be used to create some personal private keys and a certificate for use with SignApk.jar.
The "SignApk.jar" file may be downloaded from the Git repo, or you can use Google to search for "AndroidMod.zip download", which also contains the tool.
openssl genrsa -out key.pem 1024 openssl req -new -key key.pem -out request.pem 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
Then, you can sign an .apk file using the SignApk.jar tool and the key.pk8 and certificate.pem files you created
java -jar SignApk.jar certificate.pem key.pk8 Application.apk Application_signed.apk
About "AndroidMod.zip":
http://forum.xda-developers.com/showthread.php?t=442480&page=83
本文内容归CSDN博客博主Sodino 所有
转载请注明出处:http://blog.csdn.net/sodino/archive/2011/01/26/6165143.aspx
更多相关文章
- android手机状态解释,比如android.os.Build.VERSION.SDK
- Android(安卓)Studio 使用技巧(5)
- Android(安卓)Studio 使用技巧(4)
- Android(安卓)Studio 使用技巧(6)
- Android_判断文件是否存在并创建代码
- Android(安卓)GestureDetector手势识别类
- 关于android中的各种路径对应的方法
- Android(安卓)xxx is not translated in yyy, zzz 的解决方法
- Android之Telephony各文件解释