如何签署一个已经编译好的 Apk [英] How to Sign an Already Compiled Apk

查看:30
本文介绍了如何签署一个已经编译好的 Apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用 apktool 解码了一个 APK(因为原始源代码丢失了),所以我可以修复布局 xml 文件的一些问题.然后我用 apktool 重新构建了它,当我尝试在我的设备上安装它时(使用 adb:adb install appname.apk)它给了我这个错误:

I've decoded an APK with apktool (as the original source code was lost) so I could fix some issues with the layout xml files. I've then rebuilt it back up with apktool and when I tried to install it on my device (using adb: adb install appname.apk) it gave me this error:

[INSTALL_PARSE_FAILED_NO_CERTIFICATES]

然而,原始 apk 是由密钥库签名的(在 Eclipse IDE 上),这个不是,我如何在 Eclipse 之外使用它的原始 keystone 文件对其进行正确签名!?

the original apk however was signed by a keystore (on eclipse IDE), this one isn't, how can I sign it properly with it's original keystone file outside Eclipse!?

推荐答案

使用

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

然后使用:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore my_application.apk alias_name

点击此处了解更多信息

这篇关于如何签署一个已经编译好的 Apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆