3

I want to know how two different apk files are signed with same key in Android.

Nitin4Android
  • 814
  • 2
  • 12
  • 24

2 Answers2

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,548
  • 2
  • 19
  • 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,731
  • 20
  • 38