APK는 이전 버전과 동일한 인증서로 서명되어야합니다.
얼마 전에 내 앱을 Google Play에 업로드했습니다 (Android 마켓이라고 불렸을 때).
오늘 앱을 업데이트했지만 이전 키 저장소를 삭제하고 새 키 저장소를 작성했습니다.
업로드 할 때 APK는 이전 버전과 동일한 인증서로 서명해야합니다.
업로드 실패
다른 인증서로 서명 된 APK를 이전 APK에 업로드했습니다. 동일한 인증서를 사용해야합니다.
기존 APK는 지문이있는 인증서로 서명됩니다.
[SHA1 : 89 : 2F : 11 : FE : CE : D6 : CC : DF : 65 : E7 : 76 : 3E : DD : A7 : 96 : 4F : 84 : DD : BA : 33]
및 업로드 한 APK에 서명하는 데 사용 된 인증서에는 지문이 있습니다.
[SHA1 : 20 : 26 : F4 : C1 : DF : 0F : 2B : D9 : 46 : 03 : FF : AB : 07 : B1 : 28 : 7B : 9C : 75 : 44 : CC]
그러나이 인증서가 없으며 활성 사용자가 있기 때문에 응용 프로그램을 삭제하고 다시 게시하고 싶지 않습니다.
새 인증서로 앱에 서명하려면 어떻게해야합니까?
아무것도. 설명서 읽기 : Android 마켓에 업데이트 게시
업데이트 된 애플리케이션을 업로드하기 전에 매니페스트 파일의 요소에서 android : versionCode 및 android : versionName 속성을 증가시켜야합니다. 또한 패키지 이름이 같아야하고 .apk에 동일한 개인 키로 서명해야합니다. 패키지 이름 및 서명 인증서가 기존 버전과 일치하지 않으면 Market은이를 새 응용 프로그램으로 간주하여 사용자에게 업데이트로 제공하지 않습니다.
실수로 디버그 키로 서명 했습니까?
Google Play에서는 디버그 키 저장소로 서명 된 앱을 게시 할 수 없습니다. 이러한 APK를 업로드하려고하면 "디버그 모드로 서명 된 APK를 업로드했습니다. APK를 릴리스 모드로 서명해야합니다."라는 메시지와 함께 Google Play가 실패합니다.
그러나 디버그 키 저장소로 서명 된 업데이트 를 업로드하려고하면 이 메시지 가 표시 되지 않습니다 . Google Play는 SHA1 지문을 참조하여 질문에 표시된 메시지를 표시합니다.
먼저 실수로 디버그 키로 앱에 서명했는지 확인하십시오.
사용 된 서명 키를 어떻게 확인합니까?
APK에서 정보를 수집
Java를 사용하여 다음 명령을 사용하여 원래 APK 및 업데이트 APK에 서명 된 인증서를 확인할 수 있습니다 keytool
.
keytool -list -printcert -jarfile original.apk
keytool -list -printcert -jarfile update.apk
다음은 APK 서명 방법에 대한 자세한 정보를 보여줍니다.
Owner: CN=My App, O=My Company, L=Somewhere, C=DE
Issuer: CN=My App, O=My Company, L=Somewhere, C=DE
Serial number: 4790b086
Valid from: Mon Nov 11 15:01:28 GMT 2013 until: Fri Mar 29 16:01:28 BST 2041
Certificate fingerprints:
MD5: A3:2E:67:AF:74:3A:BD:DD:A2:A9:0D:CA:6C:D4:AF:20
SHA1: A6:E7:CE:64:17:45:0F:B4:C7:FC:76:43:90:04:DC:A7:84:EF:33:E9
SHA256: FB:6C:59:9E:B4:58:E3:62:AD:81:42:...:09:FC:BC:FE:E7:40:53:C3:D8:14:4F
Signature algorithm name: SHA256withRSA
Version: 3
여기서주의해야 할 중요한 부분 (각 APK에 대해)은 SHA1 지문 값, 소유자 신원 값 및 유효 시작 날짜 까지 입니다.
해당 keytool
명령이 작동하지 않으면 ( -jarfile
옵션에 Java 7 필요) 다음 jarsigner
명령을 통해보다 기본적인 정보를 얻을 수 있습니다 .
jarsigner -verify -verbose:summary -certs original.apk
jarsigner -verify -verbose:summary -certs update.apk
불행히도 SHA1 지문은 표시되지 않지만 인증서 만료 날짜와 함께 X.509 소유자 ID가 표시됩니다. 예를 들면 다음과 같습니다.
sm 4642892 Thu Apr 17 10:57:44 CEST 2014 classes.dex (and 412 more)
X.509, CN=My App, O=My Company, L=Somewhere, C=DE
[certificate is valid from 11/11/13 12:12 to 29/03/41 12:12]
[CertPath not validated: Path does not chain with any of the trust anchors]
인증서 체인 또는 타임 스탬프에 대한 경고와 함께 "CertPath not validated"메시지는 무시해도됩니다. 이 경우에는 관련이 없습니다.
APK간에 소유자, SHA1 및 만료 값을 비교하십시오.
경우 소유자 / X.509 식별 값이
CN=Android Debug, O=Android, C=US
, 당신은 당신과 함께 APK에 서명 한 디버그 키 가 아닌 원래 릴리스 키는 IF SHA1의 지문 값이 원래 및 업데이트 된 APK와 다른, 당신은 않았다 없는 모두의 APK에 대해 동일한 서명 키를 사용하여
는 IF 소유자 / X.509 식별 값이 다른, 또는 인증서 만료 날짜가 두 APK가 사이에 차이가, 당신은 않았다 없는 모두의 APK에 대해 동일한 서명 키를 사용하여
두 인증서간에 Owner / X.509 값이 동일하더라도 이는 지문 값과 같이 일치하는 항목이없는 경우 인증서가 동일하다는 것을 의미하지는 않습니다.
원래 키 저장소를 검색하고 백업을 확인하십시오.
두 APK에 서로 다른 인증서 정보 가 있는 경우 원래 키 저장소, 즉 Google Play (또는 keytool
)가 말한 첫 번째 SHA1 지문 값을 가진 파일을 찾아야 합니다.
올바른 SHA1 지문이있는 파일이있을 때까지 컴퓨터 및 모든 백업에서 찾을 수있는 모든 키 저장소 파일을 검색하십시오.
keytool -list -keystore my-release.keystore
Enter비밀번호를 묻는 메시지가 표시되면을 누르십시오 . SHA1 값을 빠르게 확인하려는 경우 비밀번호를 입력 할 필요가 없습니다.
I can't find the original keystore anywhere
If you cannot find the original keystore, you will never be able to publish any updates to this particular app.
Android mentions this explicitly on the Signing Your Application page:
Warning: Keep your keystore and private key in a safe and secure place, and ensure that you have secure backups of them. If you publish an app to Google Play and then lose the key with which you signed your app, you will not be able to publish any updates to your app, since you must always sign all versions of your app with the same key.
After the first release of an APK, all subsequent releases must be signed with the exact same key.
Can I extract the original signing key from the original APK?
No. This is not possible. The APK only contains public information, and not your private key information.
Can I migrate to a new signing key?
No. Even if you do find the original, you can't sign an APK with key A, then sign the next update with both keys A and B, then sign the next update after that with only key B.
Signing an APK (or any JAR file) with multiple keys is technically possible, but Google Play no longer accepts APKs with multiple signatures.
Attempting to do so will result in the message "Your APK has been signed with multiple certificates. Please only sign it with one certificate and upload it again."
What can I do?
You will have to build your app with a new application ID (e.g. change from "com.example.myapp" to "com.example.myapp2") and create a brand new listing on Google Play.
Possibly you will also have to change your code so that people can install the new app even if they have the old app installed, e.g. you need to make sure that you don't have conflicting content providers.
You will lose your existing install base, reviews etc., and will have to find a way to get your existing customers to uninstall the old app and install the new version.
Again, ensure you have secure backups of the keystore and password(s) you use for this version.
Nothing - Google says it clearly that the application is identified by the keys used to sign it. Consequently if you've lost the keys, you need to create a new application.
Today i faced same issue, unfortunately, i was having two aliases in my keystore file.
Here i get the answer for that question . After searching for too long finally i get to crack the key and password for this . I forget my key and alias also the jks file but fortunately i know the bunch of password what i had put in it . but finding correct combinations for that was toughest task for me .
Solution - Download this - Keytool IUI version 2.4.1 plugin
the window will pop up now it show the alias name ..if you jks file is correct .. right click on alias and hit "view certificates chain ".. it will show the SHA1 Key .. match this key with tha key you get while you was uploading the apk in google app store ...
if it match then you are with the right jks file and alias ..
now lucky i have bunch of password to match ..
now go to this scrren put the same jks path .. and password(among the password you have ) put any path in "Certificate file"
if the screen shows any error then password is not matching .. if it doesn't show any error then it means you are with correct jks file . correct alias and password() now with that you can upload your apk in play store :)
If you have previous apk file with you(backup) then use jarSigner to extract certificate from that that apk, then use that key or use keytool to clone that certificate, may be that will help... Helpful links are jarsigner docs and keytool docs.
I highly recommend Keystore Explorer (https://keystore-explorer.org/) which lets you access your keystore without having to upload it to Google Play. This way you can troubleshoot whether you are entering your password incorrectly.
I just had this occur out of the clear blue. I really do not think I changed anything.
However, 'Build'/'Clean Project' fixed it.
I had faced this issue recently, after trying different ways to sign in like enable V1 Or V2, signed in by changing alias name and last come to know that I am using wrong key store file
You can use new feature Google play app signing to generate a new key file .
After May 2017 Google play store add a new feature on Play store and It’s Good News For Android Developers. From this feature, Developer can update their app or Apk who lost a KeyStore file. you need to enable google play app signing on play store console.
https://support.google.com/googleplay/android-developer/answer/7384423?hl=en
http://www.geekcodehub.com/2018/05/23/keystore-lost-in-android/
My [silly] mistake was that i used app-debug.apk file instead of app-release.apk file. You need to to choose "release" in "Build Variants" frame when you generate signed APK. The app-release.apk file should be located under "app\release" folder in your project root.
'Programming' 카테고리의 다른 글
스택 풀기 란 무엇입니까? (0) | 2020.05.15 |
---|---|
$ .ajax ()에서 아약스 요청에 배열 전달 (0) | 2020.05.15 |
fork () 분기가 예상보다 많습니까? (0) | 2020.05.15 |
특정 ArrayList 항목 가져 오기 (0) | 2020.05.15 |
JavaScript에서 두 줄 이상의 코드에서 문자열을 나누려면 어떻게해야합니까? (0) | 2020.05.15 |