Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to get signature Checksum of any Apk on MAC

Command to get the Signature Checksum of any APK on Mac machine


What are signature checksum:


SHA-256 / SHA-512 / MD5 are hashing algorithm used while signing a file. The file can be .apk , .txt
A file is signed so that its autheticity can be known. If the file is tampered, the Checksum would change and by comapring the original and the file checksum you can confirm if the file was modified or not before you start using it.
For Android APK, a tool is used to sign and verify it. It is apksigner. That binary would be available in the Android SDK usually under build-tools. e.g on Mac I've it under::

Users//Library/Android/sdk/build-tools/29.0.2/

Usual command that works on windows machine:


apksigner verify -print-certs [apk] | grep -Po "(?

Signature checksum command for Mac:


On Mac machine the "Grep" Command with -Po  does not work and throws error.
For that we need to replace the way we do grep by using perl

perl -nle 'print $& if m{(?


Here is how your final command to find the checksum of android apk would be 

/Users//Library/Android/sdk/build-tools/29.0.2/apksigner verify -print-certs | perl -nle 'print $& if m{(?

Hope the command helped you. Reply in the comment.


This post first appeared on G33K-TRICKS - Your Source To Tips And Tricks, please read the originial post: here

Share the post

How to get signature Checksum of any Apk on MAC

×

Subscribe to G33k-tricks - Your Source To Tips And Tricks

Get updates delivered right to your inbox!

Thank you for your subscription

×