Skip to content

Instantly share code, notes, and snippets.

@rhee
Created November 20, 2015 02:51
Show Gist options
  • Select an option

  • Save rhee/bcb529cac0ecb2d3d03e to your computer and use it in GitHub Desktop.

Select an option

Save rhee/bcb529cac0ecb2d3d03e to your computer and use it in GitHub Desktop.
#!/bin/sh
dxbin=$( find "$ANDROID_HOME/build-tools" -type f -name dx | tail -1 )
if [ ! -x "$dxbin" ]; then
echo "dx not found"
exit 1;
fi
for input in "$@"; do
count=$( "$dxbin" --dex --output=- "$input" | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"' )
echo $count "$input"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment