Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
495 views
in Technique[技术] by (71.8m points)

xamarin.android - Lost my debug.keystore due to Xamarin new installation. Can i recover it?

I'm using for demo purpose an APK made by Xamarin and signed with the default debug.keystore. Due to new Xamarin installation the keystore are changed and now I cannot upgrade new version of the apk because I run into 'Application not Installed' error. For several reasons I don't want my users uninstall the previous app losing their data. I agree that I haven't to use a debug key for release (I've learned this lesson) but is there a way to recreate the previous debug.keystore by its signature and the one of the app?

This is the keytool output of debug.keystore:

Nome alias: androiddebugkey
Data di creazione: 3-apr-2016
Tipo di voce: PrivateKeyEntry
Lunghezza catena certificati: 1
Certificato[1]:
Proprietario: CN=Android Debug, O=Android, C=US
Autoritó emittente: CN=Android Debug, O=Android, C=US
Numero di serie: 76df3d0d
Valido da: Sun Apr 03 15:22:52 CEST 2016 a: Tue Mar 27 15:22:52 CEST 2046
Impronte digitali certificato:
         MD5:  4C:00:43:61:97:17:DF:B1:95:42:37:53:30:1A:A4:AC
         SHA1: D5:48:B9:2A:09:66:58:B8:38:16:88:60:47:F3:BF:87:2C:6B:3F:5E
         SHA256: 58:36:AF:FB:45:2B:E8:9E:C3:8D:F4:77:75:FF:F6:6E:84:69:3E:06:35:37:45:F5:D3:65:A9:4B:68:22:98:AC
         Nome algoritmo firma: SHA256withRSA
         Versione: 3

Estensioni:

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 44 00 83 0D B8 9B 86 88   91 A0 14 D0 8D 72 39 83  D............r9.
0010: ED F1 7D E7                                        ....
]
]

and this is my App ANDROIDD.RSA fingerprint:

Autoritó emittente: CN=Android Debug, O=Android, C=US
Numero di serie: 2f716439
Valido da: Mon Sep 14 19:26:58 CEST 2015 a: Wed Sep 06 19:26:58 CEST 2045
Impronte digitali certificato:
         MD5:  A3:FF:BC:BA:EF:72:BC:89:1C:42:6A:99:09:B7:C9:EE
         SHA1: 8D:16:7B:03:99:8A:4F:1C:F4:AC:E1:7D:6A:18:62:58:74:FC:0E:CB
         SHA256: D1:37:98:26:74:F7:58:C7:06:17:4B:9E:3A:76:C9:23:6B:D9:D4:38:22:6A:9A:87:82:6A:58:2A:F7:2E:94:B6
         Nome algoritmo firma: SHA256withRSA
         Versione: 3

Estensioni:

#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: E3 BB C0 63 F2 60 C6 B0   94 2A 29 68 36 F0 A8 A8  ...c.`...*)h6...
0010: 1E 97 B6 D3                                        ....
]
]

So the question is: with these informations can I recreate previous debug.keystore for a seamless App upgrading?

Many thanks for your attention.

Regards, Danilo

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You can't recover the old one(Unless you do a system restore/etc). So you'll just have to create a new one:

keytool -genkey -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android -keyalg RSA -validity 14000

You can then put that in the respective directory:

Windows: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/MD5_SHA1/#Windows

Mac: https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/MD5_SHA1/#OSX


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...