Skip to content

Instantly share code, notes, and snippets.

@korniltsev
Forked from chetbox/count_apk_methods.sh
Created October 22, 2016 16:11
Show Gist options
  • Save korniltsev/8e3a34338aa9aa9a1dc25d074133bf39 to your computer and use it in GitHub Desktop.
Save korniltsev/8e3a34338aa9aa9a1dc25d074133bf39 to your computer and use it in GitHub Desktop.
Method count of multidex APK one-liner
apk=app.apk count=0 ; for dex in $(unzip -Z1 $apk classes*.dex); do count=$(($count + $(unzip -p $apk $dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'))) ; done ; echo $count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment