-
-
Save Jipok/a9467ff249008918b5219acba1d3b958 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 | |
set -euo pipefail | |
UNISTALL_CMD="echo -n {} '- '; adb shell pm uninstall --user 0 {}" | |
while true; do | |
pkgs=$(adb shell 'pm list packages -f') | |
names=$(echo "$pkgs" | grep -Po '[^=]*$') | |
paths=$(echo "$pkgs" | grep -Po '(?<=:)(.+?)(?!.*=)' | sed 's/.\{1\}$//') | |
paste <(echo "$names") <(echo "$paths") | column -t | fzf -m -i -n1 -d' ' | \ | |
cut -f1 -d' ' | xargs -r -I{} sh -c "$UNISTALL_CMD" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment