5

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

Nitin4Android
  • 864
  • 2
  • 12
  • 25

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,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