Google 应用签名 - 仍然可以上传使用旧密钥库签名的 Apk

Google App Signing - Still able to upload the Apk signed with old Keystore

在选择 "Google Play App Signing"

之前,我使用 p12 证书签署了我的 APK

我已按照@MatPag 编写的下面 Post 中描述的步骤激活 Google 应用程序签名。

激活后,我仍然可以使用旧的 p12 证书和新创建的上传密钥库签署并上传我的 APK 文件。这是预期的行为,还是我做错了什么?

据我从 Google Play App Signing 文档中了解到,我应该无法将 APK 上传到 Google 已使用旧 p12 证书签名的 Play Console。

是的,这是正常行为。如果您愿意,您实际上可以将 p12 证书转换为密钥库:

首先创建一个空的密钥库:

keytool -genkey -alias <somename> -keystore <somecertificatename>.jks

现在将 p12 证书转换为密钥库:

keytool -v -importkeystore -srckeystore <yourp12certficate>.p12 -srcstoretype PKCS12 -destkeystore <somecertificatename>.jks -deststoretype JKS

这是预期的行为。这允许开发人员上传使用上传密钥签名的 App Bundle 并在测试轨道上对其进行测试,同时不更改 APK 的构建或发布过程。

来自Google的回答:

Thanks for your patience.

I have looked into your APK and screenshots you have provided and it seems there are no issues with this.

You can continue to use both keys going forward to sign your app.

Case 1: Sign APK with old p12 certificate which has been used before enrolling to Google App Signing.

Case 2: Sign APK with newly created upload certificate which has been generated while enrolling to Google App Signing.