android: 官方apk签名文档
来源:互联网 发布:cntv中国网络电视台 编辑:程序博客网 时间:2024/06/05 23:27
Signing Your App Manually 手动签名APP
You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line:
Generate a private key using
keytool
. For example: 生成Key$ keytool -genkey -v -keystore my-release-key.keystore-alias alias_name -keyalg RSA -keysize 2048 -validity 10000
This example prompts you for passwords for the keystore and key, and to provide the Distinguished Name fields for your key. It then generates the keystore as a file called
my-release-key.keystore
. The keystore contains a single key, valid for 10000 days. The alias is a name that you will use later when signing your app.Compile your app in release mode to obtain an unsigned APK.
Sign your app with your private key using
jarsigner
: 签名$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1-keystore my-release-key.keystore my_application.apk alias_name
This example prompts you for passwords for the keystore and key. It then modifies the APK in-place to sign it. Note that you can sign an APK multiple times with different keys.
Verify that your APK is signed. For example: 验证是否签名成功
$ jarsigner -verify -verbose -certs my_application.apk
Align the final APK package using
zipalign
. APK对齐$ zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
zipalign
ensures that all uncompressed data starts with a particular byte alignment relative to the start of the file, which reduces the amount of RAM consumed by an app.
- android: 官方apk签名文档
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android应用程序签名(官方文档中文版)
- Android官方技术文档翻译——Apk 拆分机制
- Android APK签名 -- APK Crack
- Android Apk签名
- Android Apk签名
- Android Apk签名
- Android apk文件签名
- Android APK 签名分析
- Android APK 签名机制
- Android APK签名
- s.indexOf(c)的用法,在字符串“s”中第一次出现字符“c”的位置。
- [精]国外程序员整理的Java资源大全
- 正则表达式 超经典教程
- IPC——管道(Pipe)
- C#中页面之间传值传参的六种方法
- android: 官方apk签名文档
- 进程与线程的一个简单解释
- oracle学习笔记(3)(数据文件,日志文件,临时文件)
- HEVC码率控制代码追踪(三)
- ServletContextLisenter
- 做完了PAT (Basic Level) Practise (中文)总结一下
- 关于fragment中监听返回键或者其它的按键
- 用户定义的日期/时间格式(Format 函数)
- Javascript模块化编程