-
-
Save j796160836/2489a33c370ab849a461 to your computer and use it in GitHub Desktop.
Get installed packages and convert into command format (Just copy & paste to uninstall whatever packages.)
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
#!/bin/bash | |
DEVICE=$1 | |
if [ -z $DEVICE ]; then | |
DEVICE=`adb devices | sed '/List of devices/d' | head -n 1 | awk '{print $1}'` | |
fi | |
if [ -z "$DEVICE" -o "$str" == " " ]; then | |
echo "Please connect a device." | |
exit 1 | |
fi | |
adb -s $DEVICE shell 'pm list packages -f -3' | sed -e 's/.*=//' | sed -e "s/^/adb -s $DEVICE uninstall /" | sort | less |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment