Skip to content

Instantly share code, notes, and snippets.

Working from home

Shintaro Katafuchi hotchemi

Working from home
View GitHub Profile
rallat / dexmethodcount
Last active Dec 14, 2015
Android Dex Method Count more sophisticated scripts that gives you method cound by package @JakeWharton and @tsmith
View dexmethodcount
You can add this to your shell profile and then use it as dexcount file.
This file should have a classes.dex in order to work, that means it has to be a android lib project or android apk.
mkdir temp >/dev/null
cp $1 temp/$1+copy > /dev/null
unzip temp/$1+copy -d temp/ > /dev/null
cat temp/classes.dex | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
rm -R temp > /dev/null