如何注册有多个证书的APK? [英] How to sign an APK with more than one certificate?

查看:188
本文介绍了如何注册有多个证书的APK?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何注册一个APK有多个证书,这样我可以做到这一点,当我发布到Android Market:

1.0版=>签署证书
2.0版=>签署证书A和乙
3.0版=>签署证书乙

Version 1.0 => Signed with Certificate A
Version 2.0 => Signed with Certificate A & B
Version 3.0 => Signed with Certificate B

Android的市场确实给了我一些希望,但我不知道该怎么做了吧,当我上传了不同的标志证书,它给了我这个消息:

The Android Market does give me some hope but I am not sure what to make of it, when I upload with a different sign certificate it gives me this message:

的APK必须至少有一个证书与相同previous版本签名。

"The apk must be signed with at least one certificate in common with the previous version."

动机:
我已经发布了使用的MOTODEV工作室为Android的部分Android的签名工具在市场上的应用程序。的问题是,它处理密钥本身并没有办法(记录)得到它们。我想改变它使用一个密钥库和证书,我有更多的控制,并可以使用,即使我不使用MOTODEV Studio的了。此外,它似乎MOTODEV Studio将你锁在外面了新的功能,如共享库。

Motive:
I have published an app on the market using the Android Signing Tool as part of MotoDev Studio for android. The problem is that it handles the keys itself and there is no way (documented) to get them. I want to change it to use a keystore and certificate that I have more control of and can use even if I don't use MotoDev Studio anymore. Also it seems that MotoDev Studio will lock you out of new features such as shared libraries.

更新2011年5月3日:
他们已经确实非常快,并提示在更新MOTODEV Studio,但好像我认为谷歌应该还是提供了一个变通的那些想改变自己的应用程序的认证。更新适用于所有使用相同的证书,随着时间的推移创建新的,并有可能创造一个新的,所以,你可以把你的应用程序,以别人的支持和分配。

UPDATE 5/3/2011:
They have been actually really quick and prompt at updating MotoDev Studio but it seems like I believe that Google should still provide a work around for those that want to change the certificates of their applications. Updating application to all use the same certificate, creating new ones over time, and possibly creating a new one so that you may hand of the support and distribution of your application to others.

推荐答案

如果你想签一个APK不止一次,只是这样做。
但是请注意,谷歌播放不接受的APK与多个签名。

If you want to sign an APK more than once, just do so.
But note that Google Play does not accept APKs with multiple signatures.

如。您可以使用签署命令行的APK 的jarsigner 像这样:
的jarsigner -keystore原始密钥库我-APP-unsigned.apk密钥别名别名

eg. You can sign an APK from the command line using jarsigner like so:
jarsigner -keystore original-keystore my-app-unsigned.apk key-alias alias

然后,只需重复这与第二个关键:
的jarsigner -keystore新的签名,密钥库我-APP-unsigned.apk密钥别名

Then just repeat this with the second key:
jarsigner -keystore new-signing-keystore my-app-unsigned.apk key-alias

不要忘了随后运行 zipalign :< BR> zipalign -v 4我-APP-unsigned.apk我-app.apk

Don't forget to run zipalign afterwards:
zipalign -v 4 my-app-unsigned.apk my-app.apk

我只是重新阅读MOTODEV Studio中的一部分。在这种情况下,你可以先用MOTODEV APK像往常一样只需登录,然后登录你的如上在命令行上新的密钥。

I just re-read the part about MotoDev studio. In that case you can just sign the APK first using MotoDev as usual, then sign with your new key on the command line as above.

这篇关于如何注册有多个证书的APK?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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