Reputation: 2129
I am working on declaring app site association in assetLinks.json file and as a part I need to declare the SHA-256 certificate fingerprint. have a debug apk and is there any way to get its SHA-256 certificate fingerprint?
Upvotes: 1
Views: 3081
Reputation: 42754
Displaying the SHA-256 certificate fingerprint of any signed APK is pretty simple: You just need apksigner
from Android SDK which is included in the build-tools
Android SDK package (there is one for each Android version e.g. "31.0.0").
As apksigner.bat
respectively apksigner.sh
is not in the PATH you need to execute it with it's full path (which is omitted in the following example).
Example from an debug app:
apksigner verify --print-certs Application-debug.apk
Signer #1 certificate DN: C=US, O=Android, CN=Android Debug
Signer #1 certificate SHA-256 digest: ce512066e25ef809f964c8c382a292bbf17d163079edc7cf2f90a89adad4bb66
Signer #1 certificate SHA-1 digest: 06ea5851f235339da7c75775b697f12e9139dc2d
Signer #1 certificate MD5 digest: 61663acdd59671e62dc2a2c4ee2bf20a
Upvotes: 2