I would like to programmatically perform a check on the APK\'s signature at runtime. I own a keystore on my development workstation, so I could know (dunno how) the public k
I think I have the same situation like you have. Here is my original solution.
You may have a try on it.
Signature sig = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).signatures[0];
Signature releaseSig = context.getPackageManager().getPackageAchiveInfo("/mnt/sdcard/myReleaseApk.apk", PackageManager.GET_SIGNATURES).signatures[0];
return sig.hashCode() == releaseSig.hashCode;
You could try this, it should work
Signature[] sigs = getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).signatures;
for (Signature sig : sigs)
{
// log the sig here
}