Skip to content

Instantly share code, notes, and snippets.

@obfusk
Last active January 19, 2025 22:42
Show Gist options
  • Save obfusk/e590d4e5fda7d365c48b8b3a6d74f9f4 to your computer and use it in GitHub Desktop.
Save obfusk/e590d4e5fda7d365c48b8b3a6d74f9f4 to your computer and use it in GitHub Desktop.
get APK cert fingerprint using apkrepotool
#!/usr/bin/env python3
import hashlib
import sys
import apkrepotool
from pathlib import Path
for apk in sys.argv[1:]:
certs, _ = apkrepotool.get_signing_certs(Path(apk))
print(apk, [hashlib.sha256(cert).hexdigest() for cert in certs])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment