Last active
February 3, 2025 03:30
-
-
Save Rudxain/66d308f7de54facf378f37adee49b624 to your computer and use it in GitHub Desktop.
Copy APK from pack name. Minimal dependencies (no ADB required). https://llamalab.com/automate/community/flows/38806
This file contains hidden or 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
#!/system/bin/sh | |
set -euf | |
for pack in "$@" | |
do | |
# `cmd package` is "more portable" than `pm`, | |
# because Termux has its own `cmd` override: | |
# https://github.com/termux/termux-tools/issues/157#issuecomment-2614142899 | |
# See also: | |
# https://github.com/termux/termux-packages/discussions/8292#discussioncomment-5102555 | |
REPLY="$(cmd package path "$pack")" | |
if [[ -z "$REPLY" ]] | |
then | |
printf '%s\n' "$pack not found" | |
else | |
REPLY=("${REPLY[@]}") | |
cp "${REPLY[0]:8}" "${pack}.apk" | |
fi | |
done | |
# LICENSE: https://unlicense.org |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment