I want to know how two different apk files are signed with same key in Android.
Asked
Active
Viewed 1,356 times
5
-
possible duplicate of [How to get app signature?](http://stackoverflow.com/questions/5578871/how-to-get-app-signature) – Apr 17 '14 at 12:06
-
Can't find my answer in the link above... – Nitin4Android Apr 17 '14 at 12:19
-
did you find the solution? – Anjana Dec 18 '17 at 06:54
2 Answers
4
Unpack both APKs, and run
keytool -printcert -file META-INF/yourfile.RSA
Then, compare the fingerprints, if they are the same, the keys were the same.

derFunk
- 1,587
- 2
- 20
- 31
0
Use PackageManager.getPackageInfo() passing GET_SIGNATURES as the flags for each of the applications.
The PachageInfo.signatures arrays can then be deep compared for equality - that is to say call equals() on each of the corresponding items in the two arrays.

zmarties
- 4,809
- 22
- 39