使用多个证书签署应用程序
来自 https://developer.android.com/studio/publish/index 的签名文档.html:
当系统安装应用程序更新时,如果新版本中的任何证书与旧版本中的任何证书匹配,则系统允许更新。
这表明一个应用程序可以使用多个证书进行签名。
这是一个有趣的选项,允许多个实体签署应用程序。例如:最初由设备制造商签名的系统应用程序。进一步的更新可以由开发人员签署。
我是否误读了文档或者这真的可能吗?如果是这样,怎么办?
应用程序是否有其他方式支持不同的证书并让两个或更多实体对其进行签名?
From the signing documentation at https://developer.android.com/studio/publish/index.html:
When the system is installing an update to an application, if any of the certificates in the new version match any of the certificates in the old version, then the system allows the update.
This indicates that an application can be signed with multiple certificates.
This is an interesting option to allow multiple entities to sign an application. e.g: A system application which was initially signed by the device's manufacturer. Further updates could be signed by the developer.
Am I misreading the documentation or is this really possible? If so, how?
Is there any other way for an application to support different certificates and with that, having two or more entities sign it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您在签名过程中使用不同的别名,则可以使用不同的证书对 apk 进行签名。
这将在 META-INF 文件夹内创建不同的文件。我不知道这对 Android 市场内的更新过程有何影响。
You can sign apks with different certificates if you use a different alias in the signing process.
This will create different files inside of the META-INF Folder. I don't know what the implications are for the update process inside the android market.
我找到了一个解决方案,虽然不是那么漂亮,但仍然是一个解决方案。
签名的 apk 文件包含以下内容:
要拥有具有多个证书的 apk:
这将允许任何签名方更新 apk。
需要注意的是,无法在更新中添加证书。
I found a solution for this, not that pretty but a solution nonetheless.
A signed apk file consists of:
To have an apk with multiple certificates:
This will allow any of the signing parties to update the apk.
One note, there is no possibility to add certificates in an update.