Sources checked 2026-11-17

Verify an APK hash and signing certificate

Compare a file’s SHA-256 and inspect its Android signing certificate before installing.

Get a trustworthy expected value

Obtain the APK and the expected SHA-256 for that exact file and release from the publisher through a separately authenticated channel. A matching hash means the bytes match that expected value; it does not prove the source or the expected value itself is trustworthy.

  • Preserve the full 64 hexadecimal characters and compare all of them, ignoring letter case and formatting spaces.
  • A hash for another architecture, version, or channel will legitimately differ. Do not install if a trusted expected hash does not match.

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.

Frequently asked questions

Can I verify the certificate without an expected fingerprint?

You can inspect it and confirm signature integrity, but cannot establish that the signer is the intended publisher without a trustworthy reference.

Why do my APK hash and certificate fingerprint differ?

They hash different things: the complete APK file and the signing certificate, respectively.

Sources and checks