下载谷歌play应用_选择在现有应用中使用Google Play应用签名

下载谷歌play应用

App Signing by Google Play has been around since 2017. With App Signing, Google manages your app signing keys and uses it to sign your APKs for distribution. Enrolling your app in App Signing is optional. You might have decided to handle the signing and storage of your keys instead of uploading them to Google Play.

自2017年以来,由Google Play进行的应用签名已存在。通过应用签名,Google可以管理您的应用签名密钥,并使用它来对您的APK进行分发。 将应用程序注册到应用程序签名是可选的。 您可能已决定处理密钥的签名和存储,而不是将其上传到Google Play。

Now, you have changed your mind and want Google to manage your signing keys instead of doing it personally. Or you want to try to reduce your app’s size and simplify the release process with Android App Bundle but you are required to use App Signing for it. So how can you opt-in your existing apps to App Signing?

现在,您已经改变了主意,希望Google管理您的签名密钥,而不是亲自执行。 或者,您想尝试通过Android App Bundle减小应用程序的大小并简化发布过程,但需要使用App Signing。 那么,如何才能选择将现有应用加入“应用签名”呢?

Opting in to app signing by Google Play

选择通过Google Play进行应用签名

Before enrolling your app to App Signing by Google Play, there are two things you need to know. First, there is no opt out so make sure that you are ready for it. Also, you won’t be able to download your app signing keys from Google Play so if you would need it in the future, store them somewhere safe.

在将您的应用注册到Google Play应用签名之前,您需要了解两点。 首先,没有退出选择,因此请确保您已经准备好了。 此外,您将无法从Google Play下载应用签名密钥,因此,如果将来需要它,请将其存放在安全的地方。

To enroll your app in App Signing, you need to upload your app signing key to Google Play. Open your app in the Google Play Console and navigate to Release Management > App Signing (Release > Setup > App Signing in the New Google Play Console). Read and accept the Terms of Service.

要将您的应用注册到应用签名中,您需要将应用签名密钥上传到Google Play。 在Google Play控制台中打开您的应用,然后导航至发布管理 > 应用签名 (在新的Google Play控制台中, 发布 > 设置 > 应用签名 )。 阅读并接受服务条款。

There are three options to export and upload your app signing key: from Android Studio, from a Java keystore, and from your key (if you’re not using a Java keystore).

可以使用以下三个选项来导出和上载应用程序签名密钥:从Android Studio,从Java密钥库和从密钥(如果您不使用Java密钥库)。

Export and upload a key from Android Studio

从Android Studio导出和上传密钥

Using Android Studio is the easiest way to to export your app signing key. Open the Build menu, then click Build > Generate Signed Bundle / APK… In the Generate Signed Bundle or APK dialog, select Android App Bundle then click Next. Select Export encrypted key for enrolling published apps in Google Play App Signing, set the location where you want to export it, then click Next. Android Studio will generate the bundle and export the private_key.pepk in the directory you provided.

使用Android Studio是导出应用签名密钥的最简单方法。 打开“构建”菜单,然后单击“ 构建” >“ 生成签名的捆绑包/ APK…”。在“生成签名的捆绑包或APK”对话框中,选择“ Android App Bundle”,然后单击“ 下一步” 。 选择导出加密密钥以在Google Play应用签名中注册已发布的应用程序,设置导出位置,然后单击下一步。 Android Studio将生成捆绑包,并将导出的private_key.pepk导出到您提供的目录中。

Image for post
Export encrypted key with Android Studio
使用Android Studio导出加密密钥

In the Google Play Console App Signing page, select “Export and upload a key from Android Studio” and upload the key Android Studio generated.

在Google Play控制台应用签名页面中,选择“ 从Android Studio导出并上传密钥 ”,然后上传生成的Android Studio密钥。

Export and upload a key from a Java Keystore

从Java密钥库导出和上传密钥

If you’re using a Java keystore to sign your apps, select the “Export and upload a key from a Java keystore” in the Google Play Console App Signing page. Download the Play Encrypt Private Key (PEPK) tool from the console and save it in your preferred location. Also, take note of the encryption key in the instructions.

如果您使用Java密钥库对应用进行签名,请在Google Play控制台应用签名页面中选择“从Java密钥库导出并上传密钥”。 从控制台下载“播放加密私钥(PEPK)”工具,并将其保存在您的首选位置。 另外,请注意说明中的加密密钥。

The PEPK tool is a JAR file that allows you to export and encrypt your app signing key. For example, if you have the following:* the PEPK tool in /Users/admin/Downloads* app signing key signing-key.jks that has “release” as the alias, located in the same folder as the pepk.jar* encrypted key from the Google Play console with the value encryptionkeyfromtheconsole

PEPK工具是一个JAR文件,可用于导出和加密应用程序签名密钥。 例如,如果您具有以下内容:* / Users / admin / Downloads *应用程序签名密钥signing-key.jks中的PEPK工具,其别名为“ release”,与pepk.jar *位于相同的文件夹中来自Google Play控制台的密钥,其值来自控制台

you can export the key to encryptedkey.pepk using the following command:

您可以使用以下命令将密钥导出到cryptokey.pepk

java -jar /Users/admin/Downloads/pepk.jar — keystore=signing-key.jks — alias=release — output=/Users/admin/Downloads/encryptedkey.pepk — encryptionkey=encryptionkeyfromtheconsole

java -jar /Users/admin/Downloads/pepk.jar — keystore = signing-key.jks —别名= release — output = / Users / admin / Downloads / encryptedkey.pepk —加密密钥=来自控制台的加密密钥

The terminal will ask you for the keystore and key password. Once you input them, the command will generate the encryptedkey.pepk file in the /Users/admin/Downloads/ directory. In the Google Play Console App Signing page, select “Export and upload a key from Java keystore” and upload the encryptedkey.pepk file.

终端会要求您提供密钥库和密钥密码。 输入它们后,该命令将在/ Users / admin / Downloads /目录中生成cryptokey.pepk文件。 在Google Play控制台应用签名页面中,选择“ 从Java密钥库导出并上传密钥 ”,然后上传加密的key.pepk文件。

Export and upload a key (not using a Java keystore)

导出和上传密钥(不使用Java密钥库)

If your app signing key wasn’t made using a Java keystore, select the “Export and upload a key (not using a Java keystore)” option in the Google Play Console App Signing page. You can download the PEPK tool source code and use the hex encoded public key provided in the console to export your private key.

如果您的应用签名密钥不是使用Java密钥库创建的,请在Google Play控制台应用签名页面中选择“导出并上传密钥(不使用Java密钥库)”选项。 您可以下载PEPK工具源代码,并使用控制台中提供的十六进制编码的公共密钥来导出您的私有密钥。

In the Google Play Console App Signing page, select “Export and upload a key (not using Java Keystore)” and upload the key you exported.

在Google Play控制台应用签名页面中,选择“ 导出并上传密钥(不使用Java密钥库) ”,然后上传导出的密钥。

Creating an Upload Key

创建一个上传密钥

An upload key is the key you will use to sign your app bundle or APK before publishing it on Google Play. You can use the same signing key as the upload key so your process will be the same as what you were doing before. However, it is better to use a different upload key so the app signing key won’t be compromised.

上传密钥是用于在您的应用包或APK发布到Google Play之前对其进行签名的密钥。 您可以使用与上载密钥相同的签名密钥,这样您的过程将与之前相同。 但是,最好使用其他上传密钥,这样应用签名密钥不会受到损害。

To create an upload key for your app, you need to create a new signing key and upload its public certificate (in PEM format). You can create a new key in Android Studio. In the Build menu, click Build > Generate Signed Bundle / APK… In the Generate Signed Bundle or APK dialog, select either Android App Bundle or APK, then click Next. Click the Create new… button below the Key store path input text. Provide the information in the New Key Store dialog then click OK.

要为您的应用创建上传密钥,您需要创建一个新的签名密钥并上传其公共证书(PEM格式)。 您可以在Android Studio中创建新密钥。 在“ 构建”菜单中,单击“ 构建” >“ 生成签名的捆绑包/ APK”。在“生成签名的捆绑包或APK”对话框中,选择“ Android App Bundle”或“ APK”,然后单击“ 下一步” 。 单击密钥存储路径输入文本下方的创建新…按钮。 在“新密钥存储”对话框中提供信息,然后单击“ 确定”

Image for post
Generating New Key Store from Android Studio 从Android Studio生成新密钥库

Let’s say your new upload key is upload-key.jks with “alias” as the alias, you can export its key to upload-cert.pem by running the following command:

假设您的新上传密钥是“ alias”作为别名的upload-key.jks ,您可以通过运行以下命令将其密钥导出到upload-cert.pem

keytool -export -rfc -keystore upload-key.jks -alias alias -file upload-cert.pem

keytool -export -rfc -keystore upload-key.jks -alias别名-file upload-cert.pem

The terminal will ask you for the keystore password. Once you provide it successfully, the command will generate the upload-cert.pem file. You can then upload this PEM file in the Google Play Console. Now, you must sign the next app updates with the upload-key.jks upload key.

终端将要求您提供密钥库密码。 成功提供后,该命令将生成upload-cert.pem文件。 然后,您可以在Google Play控制台中上传此PEM文件。 现在,您必须使用upload-key.jks上载密钥对下一个应用程序更新进行签名。

What’s Next?

下一步是什么?

Once you have uploaded the app signing key (and created a new upload key), you can click the Finish button (Save in the New Google Play Console) to save the changes. You will see a notification that App Signing is now enabled for the app. You can now use Android App Bundle in publishing your next update.

一旦你已经上传的应用程序签名密钥(并创造新的上传键),您可以单击Finish按钮( 保存在新的谷歌游戏控制台)以保存更改。 您将看到一条通知,通知您现已为该应用程序启用了“应用程序签名”。 现在,您可以使用Android App Bundle发布下一个更新。

The App Signing page will also display the certificates for the app signing key and upload key, along with their key signatures (MD5, SHA-1, SHA-256), which you will need to use for some APIs.

“应用程序签名”页面还将显示应用程序签名密钥和上载密钥的证书,以及它们的密钥签名(MD5,SHA-1,SHA-256),您需要在某些API中使用它们。

翻译自: https://proandroiddev.com/opting-in-existing-apps-to-google-play-app-signing-19239853b57f

下载谷歌play应用

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值