Skip to content

Instantly share code, notes, and snippets.

@cooperq
Created May 20, 2024 21:02
Show Gist options
  • Save cooperq/83b704262ac1e3acc98c7e8780610aca to your computer and use it in GitHub Desktop.
Save cooperq/83b704262ac1e3acc98c7e8780610aca to your computer and use it in GitHub Desktop.
Get shasums for all android apk files (for scanning in virustotal or whatever)
PKGNAMES=`adb shell "pm list packages | cut -d ':' -f 2"`
for pkg in $PKGNAMES; do
export PTH=`adb shell "pm path $pkg | cut -d ':' -f 2;"`
for pth in $PTH; do
adb shell "sha256sum $pth"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment