Skip to content

Instantly share code, notes, and snippets.

@imcaspar
Last active May 4, 2022 16:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imcaspar/8e10f2b82a4e288ddf12 to your computer and use it in GitHub Desktop.
Save imcaspar/8e10f2b82a4e288ddf12 to your computer and use it in GitHub Desktop.
dump icon from apk file (need aapt)
#!/bin/bash
if [ -z $1 ]; then
echo "Usage:$0 <Apk File>"
exit
fi
IconPath=$(aapt d badging $1 | grep application-icon | tail -1 | cut -d ':' -f 2)
IconPath=${IconPath#"'"}
IconPath=${IconPath%$"'"}
echo $IconPath
echo $1
IconName="$1"".png"
echo $IconName
unzip $1 $IconPath
mv $IconPath $IconName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment