docs: add adb one-liner to read an app's signer SHA by package name - #65
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QXorW4zR6ABUWH5Ev4pMug
…stamp)
- Use ${TMPDIR:-.} instead of hardcoded /tmp so it works on-device (Termux).
- Filter to Signer #N cert lines and print the bare digest, excluding the
Play source-stamp cert that apksigner also prints (not a signer_sha256 value).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QXorW4zR6ABUWH5Ev4pMug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a single, copy-pastable
adbcommand todocs/reference/schema.md, right next to thesigner_sha256provenance-field description, that reads an app's signer SHA-256 given only its package name.Why
The docs describe the
signer_sha256field's canonical form but never showed how to obtain the value in one step. The starting snippet (apksigner verify --print-certs /data/local/tmp/base.apk | grep -i 'SHA-256') assumed you already had the base APK on hand. This version resolves the base APK path from the package name (pm path), pulls it, and prints the digest.Notes
apksigneralready emits the colon-free, lowercase hex form thesigner_sha256field requires — no post-processing needed.tr -d '\r'strips the carriage returnadb shellappends; thesedextracts just thebase.apkentry frompm pathoutput (which lists split APKs too).🤖 Generated with Claude Code
https://claude.ai/code/session_01QXorW4zR6ABUWH5Ev4pMug
Generated by Claude Code