Reputation: 864
I want to know how two different apk files are signed with same key in Android.
Upvotes: 5
Views: 1485
Reputation: 1630
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.
Upvotes: 4
Reputation: 4869
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.
Upvotes: 0