本文介绍了安卓:构建平台源后,如何签署任意APK与平台的关键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为一个实验,我想用我的定制Android平台的平台密钥签署任意APK,即通过NDK建成。过程是怎样的去这样做呢?

As an experiment, I would like to use the platform key of my custom built Android platform to sign an arbitrary APK, that is built via the NDK. What is the process to go about doing this?

推荐答案

如果你有你的平台密钥/证书对(.pk8 + x509.pem)。它可以在编译/目标/产品/安在pulbic SDK中找到。

If you have your platform key/certificate pair (.pk8 + x509.pem). Which can be found under build/target/product/security in the pulbic sdk.

您可以使用SignApk.jar在命令行

You can use the SignApk.jar from the command line

Java的罐子SignApk.jar  platform.x509.pem platform.pk8  Application.apk Application_signed.apk

或者使自动化更容易,你可以导入密钥/证书对到你的Java密钥存储文件,使用密钥工具 - importkeypair ,并使用Ant生成文件或Eclipse进行签名。

Or to make automation easier, you can import the key/cert pair into your java keystore file, with the keytool-importkeypair, and use an ant makefile or eclipse for signing.

密钥工具,importkeypair -k  〜/ .android / debug.keystore -p机器人  -pk8 platform.pk8 -cert platform.x509.pem -alias平台

这篇关于安卓:构建平台源后,如何签署任意APK与平台的关键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!