Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

批量重命名 APK 文件为应用名称 #34

Open
zty012 opened this issue Nov 9, 2024 · 0 comments
Open

批量重命名 APK 文件为应用名称 #34

zty012 opened this issue Nov 9, 2024 · 0 comments

Comments

@zty012
Copy link
Owner

zty012 commented Nov 9, 2024

Warning

此脚本需要安装 Android Build Tools,并且将 ~/Android/Sdk/build-tools/35.0.0/aapt 替换为你的 aapt 位置

建议运行脚本以后,把 application-label 改成 application-label-zh-CN,这样文件名就是中文了

for apk in *.apk; do
    label=$(~/Android/Sdk/build-tools/35.0.0/aapt dump badging "$apk" | grep -Po "^application-label:'\K.*?(?='$)")
    if [[ -z "$label" ]]; then
        echo "error $apk"
        continue
    fi
    mv "$apk" "$label.apk"
    echo "$apk -> $label.apk"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant