uninstall android app from all connected devices and emulators
#/bin/sh | |
for DEVICE in $(adb devices | grep device$ | awk '{print $1}'); | |
do | |
for APP in $(find . -maxdepth 3 -type f | grep build\.gradle | xargs cat | grep applicationId | awk '{print $2}'); | |
do | |
RESULT=$(echo $APP | xargs -I _ adb -s $DEVICE uninstall _ 2>/dev/null); | |
if [ "$RESULT" == "Success" ]; then | |
echo "Uninstalled $APP from $DEVICE" | |
fi | |
done; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment