简体   繁体   English

如何在 Play 管理中心更改应用签名密钥?

[英]How to change app signing key on Play Console?

I want to replace the signing key generated by Google with mine, so I can update the app installed from Play Store by downloading standalone APK without issues.我想用我的替换 Google 生成的签名密钥,这样我就可以通过下载独立 APK 来更新从 Play 商店安装的应用程序而不会出现问题。

I have to follow this step:我必须按照以下步骤操作:

java -jar pepk.jar --keystore=foo.keystore --alias=foo --output=output.zip  --signing-keystore=uploadkey.keystore --signing-key-alias=upload-key-alias --encryptionkey=<enc_key>

but I don't understand it.但我不明白。 -I already generated a.pepk file with Android Studio, but the platform requires a.zip file. -我已经用Android Studio生成了一个.pepk文件,但是平台需要一个.zip文件。 Is there a way to convert it?有没有办法转换它? -The keystore might be the.jks file I use to sign, but what is uploadkey? -keystore 可能是我用来签名的.jks 文件,但是uploadkey 是什么? Is it the upload certificate (.der)?是上传证书(.der)吗?

To this day, Android Studio does not support the generation of the zip file unfortunately, you have to run the command given to you by the Play Console.直到今天,不幸的是,Android Studio 不支持 zip 文件的生成,您必须运行 Play Console 给您的命令。

The pepk file generated by Android Studio is only useful for an app that has already been enrolled in Play Signing to handover the app signing key to Google. Android Studio 生成的 pepk 文件仅适用于已注册 Play Signing 的应用,以便将应用签名密钥移交给 Google。 For new apps, the zip is required because you need to handover the certificate as well.对于新应用程序,需要 zip,因为您还需要移交证书。 Just run the pepk command from the Play Console and upload the zip file, and throw away the pepk file generated by Studio.只需从 Play 控制台运行 pepk 命令并上传 zip 文件,然后丢弃 Studio 生成的 pepk 文件。

As for the difference between the upload key and the app signing key, there's a good table of definitions in the Play Signing documentation in the section "Descriptions of keys, artifacts and tools" :至于上传密钥和应用签名密钥之间的区别,在“密钥、工件和工具的描述”部分的Play 签名文档中有一个很好的定义表:

App signing key应用签名密钥

The key Google Play uses to sign the APKs that are delivered to a user's device. Google Play 用于对传送到用户设备的 APK 进行签名的密钥。 When you opt in to app signing by Google Play, you can either upload an existing app signing key or have Google generate one for you.当您选择通过 Google Play 进行应用签名时,您可以上传现有的应用签名密钥或让 Google 为您生成一个。

The app signing key can never be changed for the lifetime of your app.应用签名密钥在应用的整个生命周期内都不能更改。 Keep your app signing key secret, but you can share your app's public certificate with others.将您的应用签名密钥保密,但您可以与他人共享您的应用的公共证书。

Upload key上传密钥

The key you use to sign your app bundle or APK before you upload it on Google Play.用于在将应用程序包或 APK 上传到 Google Play 之前对其进行签名的密钥。 Keep your upload key secret, but you can share your app's public certificate with others.将您的上传密钥保密,但您可以与其他人共享您的应用程序的公共证书。 For security reasons, it's a good idea to have app signing and upload keys that are different from each other.出于安全原因,最好使用彼此不同的应用签名和上传密钥。

There are two ways to generate an upload key:生成上传密钥有两种方法:

  • Use your app signing key: If you have Google generate an app signing key when you opt in to app signing, the key that you use for your first release is also your upload key.使用您的应用签名密钥:如果您在选择加入应用签名时让 Google 生成应用签名密钥,那么您用于第一个版本的密钥也是您的上传密钥。

  • Use a separate upload key: If you provide your own app signing key when you opt in to app signing, you are given the option to generate a new upload key for increased security.使用单独的上传密钥:如果您在选择加入应用签名时提供自己的应用签名密钥,则可以选择生成新的上传密钥以提高安全性。 If you don't generate one, use your app signing key as your upload key to sign releases.如果您不生成,请使用您的应用签名密钥作为上传密钥来签署版本。

Make sure you're clear on which key you want to change.确保您清楚要更改哪个键。 It will also depend if you have already uploaded an APK/AAB to the Play Console or not.这也取决于您是否已将 APK/AAB 上传到 Play 管理中心。 The upload key can easily be changed at any time by contacting the developer support while choosing the app signing key can only be done when creating the app before uploading the first artifact.上传密钥可以随时通过联系开发人员支持轻松更改,同时选择应用签名密钥只能在上传第一个工件之前创建应用时完成。 After that, it will require something called "key upgrade" which can only be done once in the lifetime of the app (more details in the "Upgrade your app signing key for new installs" section of the same documentation page).之后,它将需要一种称为“密钥升级”的方法,该方法只能在应用程序的生命周期中完成一次(更多详细信息,请参见同一文档页面的“升级应用程序签名密钥以进行新安装”部分)。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 (React Native) 如何将应用签名密钥上传到 Google Play 控制台? - (React Native) How to uploading App Signing Key to Google Play Console? 将 Android App Bundle 上传到 Google Play 控制台 - 密钥签名错误 - Uploading Android App Bundle to Google Play Console - key signing error Android 签名密钥更改(不是 Play Store 分布式应用程序) - Android signing key change (not Play Store distributed app) 如何更改已在 Play 商店发布的应用的签名密钥? contentProvider 还有另一种有效的替代方案吗? - How to change the signing key of an app already published on play store? Is there another efficient alternative to contentProvider? 如何在 Google Play 控制台中为应用程序签名退出 .aab 文件 - How to resign a .aab file for app signing in Google play console Google Play 应用签名证书和上传证书在 Google Play 控制台中创建了相同的 SHA1 密钥 - Both Google Play App Signing Certificate and Upload Certificate created Same SHA1 key in Google Play Console 如何通过 Google Play 商店获取带有应用签名密钥的 apk? - How to get an apk with app signing key by Google Play Store? Google Play控制台中的应用签名页面 - App signing page in google play console 使用 Google Play 控制台签署 Flutter 应用程序 - Signing a Flutter App with Google Play Console Google Play 控制台 Play 应用签名 - Android App Bundle 未签名 - Google Play Console Play App Signing - The Android App Bundle was not signed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM