Created
May 6, 2019 05:00
-
-
Save afrontend/af049f183777ad6c9f6f00e4912ac2bd to your computer and use it in GitHub Desktop.
안드로이드 앱에서 아이콘 파일 꺼내기
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
command -v jar >/dev/null 2>&1 || { echo >&2 "I require jar program but it's not on the path. Aborting."; exit 1; } | |
command -v aapt >/dev/null 2>&1 || { echo >&2 "I require aapt program but it's not on the path. Aborting."; exit 1; } | |
ICON_FILE="$(aapt d --values badging "$1" | grep "application: label" | cut -f 3 -d "=" | cut -f 2 -d "'")" | |
jar xvf "$1" "${ICON_FILE}" > /dev/null | |
cp "${ICON_FILE}" . | |
rm -r "${ICON_FILE}" | |
IFS='/' read -r -a array <<< "${ICON_FILE}" | |
echo "${array[-1]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment