Reading fingerprint information from APK

Hi guys,

I came across a Deep link Implementation and to support it from server it need to provide assestlinks.json file info with SHA256 fingerprint information. For someone new, getting this information can be pretty tricky. So I identified two ways of getting the info.

From Android Studio:

Step 1: Refer screenshot. Open the Gradle Project menu

Screen Shot 2016-06-17 at 10.49.38 am

Step 2: Refer screenshot. open the project tree and click for signingReport. Android studio will provide you the Certificate information.

Screen Shot 2016-06-17 at 10.53.14 am

Sample Data:

Variant: DebugAPK
Config: debug
Store: /Android/scripts/deployment/sample.keystore
Alias: mydebug-app
MD5: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Valid until: Friday, December 11, 2041

Or

Pack all the apk in a folder and run the below command. ( My preferred one)

find . -name “*.apk” -exec echo “APK: {}” \; -exec sh -c ‘keytool -printcert -jarfile “{}”‘ \;

Sample output:

Certificate fingerprints:
MD5: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
SHA256: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
Signature algorithm name: SHA256withRSA
Version: 3