是否有一个命令,我可以用我签字修改APK在Linux命令行? [英] Is there a command I can use to sign my modified apk on the command line in Linux?

查看:183
本文介绍了是否有一个命令,我可以用我签字修改APK在Linux命令行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我使用Adobe的PhoneGap构建建立了一个 APK 文件。如这个问题描述,我必须修改 APK 生成由Adobe PhoneGap的上传到谷歌开发者控制台之前建立。

I have an apk file that I built using Adobe Phonegap Build. As described in this question, I have to modify the apk generated by Adobe Phonegap Build before uploading it to the Google Developer Console.

我可以成功地编辑文件,重新包装的APK,和的zipalign吧。不过,我被困在上面签名。说明我所遇到的网络上的任何假设,一个是使用Eclipse,或者说一个是在Windows上。我在Linux上,我不使用Eclipse,我在命令行。

I can successfully edit the file, repack the apk, and "zipalign" it. However, I am stuck on signing it. Instructions I have come across on the web assume either that one is using Eclipse, or that one is on Windows. I am on Linux, I don't use Eclipse, and I am at the command line.

据我所知,签我的应用程序,我需要手头上的签名密钥,但除此之外,我什么命令,我需要和不明确的参数是什么。

I understand that to sign my app I need to have signing keys on hand, but beyond that I am unclear on what commands I need and what the parameters are.

我能够从Android SDK获得的zipalign 命令并执行该命令在命令行独立。我希望有一个类似的方法可以让我在命令行中运行程序签名我的应用程序。

I was able to get the zipalign command from the Android SDK and run it as a standalone at the command line. I'm hoping that there is a similar way I can run a program at the command line to sign my app.

是否有一个命令,我可以用我签字修改APK在Linux呢?

Is there a command I can use to sign my modified apk on the command line in Linux?

推荐答案

有关这个使用标准的Java SE工具:的jarsigner 密钥工具

For this you use standard Java SE tools: jarsigner and keytool.

从上签字 Android文档:

From Android documentation on signing:

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

请记住,你应该先签收再调整。

Remember that you should first sign and then align.

这篇关于是否有一个命令,我可以用我签字修改APK在Linux命令行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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