Calculate SHA-256
Replace app.apk with the actual file path. On macOS or Linux open Terminal; on Windows open PowerShell. Quoting paths protects spaces.
macOS: shasum -a 256 "app.apk"
Linux: sha256sum "app.apk"
PowerShell: (Get-FileHash -Algorithm SHA256 "app.apk").Hash
Verify the APK signature
Install Android SDK Build Tools revision 24.0.3 or later. Run apksigner from the appropriate build-tools version directory, or add that directory to PATH. On Windows invoke apksigner.bat.
- A successful verification checks the APK’s signing integrity for the platform versions considered by the tool. Record the signer certificate SHA-256 digest, which is not the same value as the APK file hash.
- Compare the certificate fingerprint with a publisher-provided fingerprint obtained independently. A valid signature alone does not establish the publisher’s real-world identity; a matching certificate is only as trustworthy as the reference you used.
- Some publishers use signing-key rotation or different store signing keys. Confirm the channel and the publisher’s documented key history before treating a difference as compromise.
apksigner verify --verbose --print-certs "app.apk"
What verification cannot tell you
Neither a matching hash nor a valid signature is a malware scan or a guarantee of safe behavior. Check the source, permissions and independent security information as well. Play Protect is a separate safeguard and can still warn about an app. This guide describes documented tools, not a physical-device test.