我丢失了 .keystore 文件?

发布于 2024-10-05 12:50:22 字数 190 浏览 1 评论 0 原文

好吧,伙计们……长话短说,我正在一台我无法再访问的计算机上进行开发。我能够检索源代码,但无法检索用于签名并将我的应用程序发布到市场的 .keystore 文件(有多次更新)。如果我想要更新,我和我可怜的用户会不会运气不好?

我知道用于签署密钥的密码(至少是三个密码之一),那么我可以创建另一个密码吗?一定有办法解决这个问题......硬盘故障怎么办?

Ok folks.. long story short, I was developing on a computer that I no longer have access to. I was able to retrieve the source code, but not the .keystore file used to sign and publish my application to the market (with several updates). Am I, and my poor users, out of luck if I ever want to update?

I know the password used to sign the key (at least it is one of three it could be), so can I create another? There must be a way around this.. what about a hard drive fail?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(12

池予 2024-10-12 12:50:23

如果您知道密钥库密码,您仍然没有关联的私钥来签署您的应用程序。您也没有机会生成与您的公钥对应的相同私钥。

因此:请务必备份您的密钥库文件。它与源代码一样重要。

If you know your keystore password, you still don't have the associated private key to sign your app. You also have no chance to generate the same private key which corresponds to your public key.

Therefore: Always backup your keystore file. It's as important as your source code.

染火枫林 2024-10-12 12:50:23

如果您已为您的应用程序启用了 Google Play 应用程序签名,则无需担心。

要检查您是否启用了 Google Play 应用签名,请转到发布管理 ->应用程序签名,在您的 Google Play 控制台中。

如果已启用,您可以通过填写支持表格来联系 Google Play 支持人员,或者您也可以选择与此处的支持人员进行实时聊天:https://support.google.com/googleplay/android-developer/answer/7218994?hl=en

向他们解释您的问题,他们会告诉他们接下来的步骤包括创建一个新的具有 25 年有效期的 2048 位 RSA 密钥库,并将密钥导出为 PEM 格式并通过电子邮件发送给他们。

要将密钥导出为 PEM 格式:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks

If you have enabled Google Play App signing for your application you do not need to worry.

To check if you have Google Play App signing enabled, go to Release management -> App Signing, in your Google Play Console.

If it is enabled you can contact Google Play Support by filling the support form or else you can also opt for live chat with a support personnel here: https://support.google.com/googleplay/android-developer/answer/7218994?hl=en

Explain them your issue and they will tell you the next steps which include creating a new 2048 bit RSA keystore with 25 years validity and exporting the key to PEM format and emailing it to them.

To export key to PEM format:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
↘紸啶 2024-10-12 12:50:23

长期以来,我也为此寻找解决方案,但到目前为止还没有成功。如果您拥有应用程序 apk 的最新版本,则可以使用 jarsigner cmd 命令从中检索证书。但您需要私钥才能更新。 Google Play 并没有为此提供任何放松。

From long days, I also search a solution for that, but not successfully till now. If you have the last version of your app apk, then you can retrieve certificates from that by using the jarsigner cmd command. But you need a private key for update. Google Play did not provide any relaxation for that.

硬不硬你别怂 2024-10-12 12:50:23

我已经使用 android studio 生成了签名的 apk,因此在“密钥存储路径”中,我只是输入了一些不带扩展名的名称,然后填写此弹出窗口并签署了应用程序。
输入图片此处描述

下次发布应用程序时,我不记得创建它的路径和名称。

不知怎的,我找到了默认位置“C:\ Program Files \ Java \ jdk1.8.0_45 \ jre \ bin”:\ jre \ bin

并在该文件夹中按日期短,然后我尝试使用最近的文件

注意:您应该记住密钥库密码和密钥密码。

I have generated the signed apk using android studio , so in the "key Store Path" i just typed some name without extension, and fill this popup and signed the application.
enter image description here

next time for publishing the application i don't remember the path and name where it was created.

somehow i find the default location which is "C:\Program Files\Java\jdk1.8.0_45\jre\bin" : \jre\bin

and in that folder short by date ,then i tried with recent file and it worked for me.

Note : you should remember the Key store password and key password.

请远离我 2024-10-12 12:50:23

是的,您可以使用新密钥发布现有应用程序的更新!

Google 现在允许您通过 Google 支持中的电子邮件/实时聊天请求他们重置密钥,从而将新密钥上传到现有应用程序。

此过程需要 1-2 个工作日。

我遵循此流程,并使用新密钥将更新上传到同一应用程序。
Google Play 商店技术团队帮助我重置了之前的密钥。

Yes, you can release an update to existing app with a new key!

Google now allows you to upload the new key to existing app by requesting them to reset it through email/live chat in Google Support.

This process takes 1-2 business days.

I followed this process and uploaded an update to the same app with a new key.
Google Play Store technical team helped me to reset the previous key.

半岛未凉 2024-10-12 12:50:23

现在是可能的,2017 年 5 月之后,如果您丢失了密钥库或密钥库密码,您可以更新您的应用程序。您无法恢复丢失的密钥库,但可以在 Playstore 上替换密钥库。
点击此处

应用签名流程:

您可以在之前或之前上传使用原始应用签名密钥签名的 APK
在您选择使用 Google Play 进行应用签名后。

如果您开始使用 Android App Bundle,您可以在
在生产中使用现有 APK 时进行测试。这是
该过程如何运作:

  1. 对您的 App Bundle 或 APK 进行签名并将其上传到您的 Play 管理中心。
  2. 根据您上传的内容,签名过程如下
    不同之处:

    • 应用程序包:Google 从您的应用程序包中生成优化的 APK,并使用应用签名密钥对其进行签名。
    • 使用上传密钥签名的 APK:Google 会验证并删除您的
      从 APK 签名,然后使用应用程序退出 APK
      签名密钥。
    • 使用应用签名密钥对 APK 进行签名:Google 会验证签名。
      Google 向用户提供签名的 APK。

It’s Possible now, After May 2017 you can Update your app if you lost your keystore or keystore password. You can not recover your lost keystore but you can replace keystore on playstore.
Click here

App signing process:

You can upload APKs signed with the original app signing key before or
after you opt in to app signing by Google Play.

If you’re starting to use Android App Bundles, you can test them in
testing tracks while you use your existing APK in production. Here’s
how the process works:

  1. Sign your app bundle or APK and upload it to your Play Console.
  2. Depending on what you upload, here’s how the signing process
    differs:

    • App bundle: Google generates optimized APKs from your app bundle and signs them with the app signing key.
    • APK signed with upload key: Google verifies and strips your
      signature from the APK, and then resigns the APK with the app
      signing key.
    • APK signed with app signing key: Google verifies the signature.
      Google delivers signed APKs to users.
痴者 2024-10-12 12:50:23

现在有专门的表格和说明来应对丢失密钥库的情况。来自Play 管理中心的帮助页面

上传密钥丢失或受损?

如果您丢失了私人上传密钥,或者该密钥已被泄露,您
可以创建一个新的,然后询问您的帐户所有者联系人
支持重置密钥
。联系支持人员时,请确保您的
帐户所有者附加 upload_certificate.pem 文件。

我们的支持团队注册新的上传密钥后,您会收到
电子邮件,然后您可以更新您的密钥库并注册您的密钥
与 API 提供商合作。

重要提示:重置上传密钥不会影响应用签名
Google Play 在将 APK 发送到之前用于重新签名的密钥
用户。

生成新密钥和 PEM 证书的步骤:

keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks

(*此密钥必须是 2048 位 RSA 密钥并且
有效期为 25 年。)

将该密钥的证书导出为 PEM 格式:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks

There's now a dedicated form and instructions for case of loosing the keystore. From Play Console's help page:

Lost or compromised upload key?

If you’ve lost your private upload key, or it’s been compromised, you
can create a new one, and then ask your account owner to contact
support to reset the key
. When contacting support, make sure your
account owner attaches the upload_certificate.pem file.

After our support team registers the new upload key, you receive an
email, and then you can update your keystores and register your key
with API providers.

Important: Resetting your upload key doesn’t affect the app signing
key that Google Play uses to re-sign APKs before delivering them to
users.

Steps to generate new key and PEM certificate:

keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks

(*This key must be a 2048 bit RSA key and
have 25-year validity.)

Export the certificate for that key to PEM format:

keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks
时光倒影 2024-10-12 12:50:23

一定有办法解决这个问题......硬盘故障怎么办?

我想补充一点,始终在 Google Drive、Dropbox 等云存储中保留密钥库的备份,或者通过电子邮件将其发送给自己。

There must be a way around this.. what about a hard drive fail?

I would like to add that always keep a backup of the keystore in cloud storage like Google Drive, Dropbox or email it to yourself.

国粹 2024-10-12 12:50:22

现在不用担心,这是重置 .JKS 文件的完整和最终步骤。

更新:正如 Play 管理中心帮助中所述此处,您现在应该已经执行了之前的步骤 3(创建新的 .jks,转换为 .pem),并且只需然后填写附有 upload_cert 和 .pem 文件的表单。这将使您的支持流程变得更加轻松快捷。

我成功休息我的密钥

第 1 步

从您的下载上传证书(文件名 - upload_cert.der) Google Play 商店控制台

下载 upload_cert.der 文件

第 2 步

转到此链接 https://support.google.com/googleplay/android-developer/contact/key?hl=en 并填写申请表使用您的有效电子邮件 ID 并上传文件 (upload_cert.der)。

填写申请表

步骤3

现在您将收到支持团队发来的电子邮件,他们不需要您的.JKS 文件,但这里的.PEM 文件是电子邮件示例。

输入图片此处描述

第 4 步

将 .JKS 文件转换为 .PEM 文件,您只需下载 密钥库浏览器
JKS 到PEM

回复邮件后,等待 48 到 72 小时,您的密钥库填充将重置。

Now it is possible don't worry, here is the full and final steps to reset .JKS file.

UPDATE: As it states in the Play Console Help here, you should now already do step 3 before (create new .jks, convert to .pem) and only then fill out the form with the upload_cert and .pem file attached. This will make the support process easier and faster for you.

I successfully rest my KEY

Step-1

Download the UPLOAD CERTIFICATE (file name - upload_cert.der) from your Google Play Store Console

to download upload_cert.der file

Step-2

Go to this LINK https://support.google.com/googleplay/android-developer/contact/key?hl=en And fill the application form with your valid Email ID and upload the file (upload_cert.der).

Fill the application form

Step-3

Now you will get the Email from support team, and they don't need your .JKS file but .PEM file here is the email Sample.

enter image description here

Step-4

to convert .JKS file to .PEM file you just have to download KeyStore Explorer
JKS to PEM

After replying the Mail, wait for 48 to 72 hours your keystore fill will reset.

妥活 2024-10-12 12:50:22

面临同样的问题。我试图通过删除的文件恢复工具来恢复它,但失败了。因此,没有其他办法:您应该发出另一份申请。

一般来说,密钥库上存在的唯一建议是:“始终备份它!”

Faced the same problem. I was trying to restore it via deleted files restoring tools, but it failed. So, there is no other way: you should issue another application.

Generally, the only advise that exists on keystores: "always back it up!"

川水往事 2024-10-12 12:50:22

直到今天,丢失密钥将导致无法使用新版本更新您的应用程序。在这种情况下,唯一的解决方案是发布一个新的应用程序,使用新的包名称和密钥,并要求所有用户安装它。

从今天开始,Play 管理中心中的应用签名密钥现在由 Google Play 安全管理,这意味着您只需负责管理您的上传密钥。如果您的上传密钥遭到泄露或丢失,Google 的开发者运营团队可以通过验证您的身份并重置上传密钥来提供帮助。 Google 仍将使用相同的应用签名密钥重新签名,从而允许应用照常更新。

对于现有应用,需要将您的应用签名密钥传输到 Google Play。 对于新应用,Google 可以生成您的应用签名密钥。注册应用程序签名后,您可以使用上传密钥对 APK 进行签名,Google 使用该密钥来验证您的身份。然后,他们将删除该签名并使用应用程序签名密钥重新签署您的应用程序。

参考: Play 管理中心帮助 >管理您的应用签名密钥

Until today, losing your key would make it impossible to update your app with a new version. In such cases, the only solution was to publish a new app, with a new package name and key, and ask all of your users to install it.

Starting from today, the app signing key in the Play Console is now securely managed by Google Play meaning that you are only responsible for managing your upload key. If your upload key is compromised or lost, Google's developer operations team can assist by verifying your identity and resetting your upload key. Google will still re-sign with the same app signing key, allowing the app to update as usual.

For existing apps, it requires transferring your app signing key to Google Play. For new apps, Google can generate your app signing key. Once enrolled in app signing, you sign your APK with an upload key, which Google uses to authenticate your identity. They'll then strip that signature and re-sign your app with the app signing key.

Reference: Play Console Help > Manage your app signing keys

泅人 2024-10-12 12:50:22

在很长一段时间内都是可能的。

  1. 按照 Android Studio 帮助中心中的说明生成一把新钥匙。它必须与以前的任何密钥不同。或者,您可以使用以下命令行生成新密钥:

keytool -genkeypair -alias newalias -keyalg RSA -keysize 2048 -validity
9125 -keystore名称ofkeystore.jks

该密钥必须是 2048 位 RSA 密钥,并且有效期为 25 年。

  1. 将该密钥的证书导出为 PEM 格式:

keytool -export -rfc -alias newalias -file upload_certificate.pem
-keystore nameofkeystore.jks

然后上传此 pem 文件并填写表单并将其提交到 此网站。一旦我们注册了新的上传密钥,您将收到一封电子邮件。 仅接受来自 Play 管理中心帐号所有者的密钥重置请求

一切都很好。您可以使用新的 jks 文件发布新版本的 apk。

It is possible for a long while.

  1. Follow the instructions in the Android Studio Help Center to generate a new key. It must be different from any previous keys. Alternatively, you can use the following command line to generate a new key:

keytool -genkeypair -alias newalias -keyalg RSA -keysize 2048 -validity
9125 -keystore nameofkeystore.jks

This key must be a 2048 bit RSA key and have 25-year validity.

  1. Export the certificate for that key to PEM format:

keytool -export -rfc -alias newalias -file upload_certificate.pem
-keystore nameofkeystore.jks

Then upload this pem file and fill the form and submit it to this site . And then you will receive an email once we've registered the new upload key . Only accepts key reset requests from the Play Console account owner.

All well and good. You can publish new release apk with your new jks file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文