Is there any way to get key hash from signed APK?
We have a signed Android apk file, and we want to find out key hash of this APK, for Facebook SDK.
Can we do that by something like jarsigner?
Any suggestions?
On linux, I used this command to get the key hash from an apk:
keytool -list -printcert -jarfile [path_to_your_apk] | grep -Po "(?<=SHA1:) .*" | xxd -r -p | openssl base64
For Mac Users (OS X) as there is no grep -P support
keytool -list -printcert -jarfile ~/Downloads/YOURAPKFILE.apk | grep "SHA1: " | cut -d " " -f 3 | xxd -r -p | openssl base64