Last active
September 9, 2025 13:27
-
-
Save Esl1h/dd9c1b82bee79e52a27fc346519ee85d to your computer and use it in GitHub Desktop.
Revisions
-
Esl1h revised this gist
Sep 9, 2025 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,8 @@ #!/bin/bash # Used to turn ann old smartphone into a DAP (Digital Audio Player) # https://esli.blog.br/transformando-antigo-smartphone-em-dap set +e export ANDROID_SERIAL=ZF523242ZG # 'adb devices' command to find your device LIST=packages-remove.txt -
Esl1h revised this gist
Sep 8, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ for pkg in "${packages[@]}"; do # Check if it exists if adb shell pm list packages 2>/dev/null | grep -q "package:$pkg$"; then echo " -> Found" # Try to remove if adb shell pm uninstall --user 0 "$pkg" >/dev/null 2>&1; then -
Esl1h created this gist
Sep 8, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,51 @@ #!/bin/bash set +e export ANDROID_SERIAL=ZF523242ZG # 'adb devices' command to find your device LIST=packages-remove.txt echo "Loading package list..." # Load all lines into an array (avoids stdin issues) readarray -t packages < "$LIST" echo "Total of ${#packages[@]} packages loaded" processed=0 success=0 failed=0 for pkg in "${packages[@]}"; do # Limpa a linha pkg=$(echo "$pkg" | tr -d '\r\n' | xargs) [[ -z "$pkg" || "$pkg" =~ ^[[:space:]]*# ]] && continue ((processed++)) echo "[$processed/${#packages[@]}] $pkg" # Check if it exists if adb shell pm list packages 2>/dev/null | grep -q "package:$pkg$"; then echo " -> Encontrado" # Try to remove if adb shell pm uninstall --user 0 "$pkg" >/dev/null 2>&1; then echo " -> ✓ Removed" ((success++)) else # Try to disable if adb shell pm disable-user --user 0 "$pkg" >/dev/null 2>&1; then echo " -> ✓ Disabled" ((success++)) else echo " -> ✗ Failed" ((failed++)) fi fi else echo " -> Not found" ((failed++)) fi done echo "" echo "Processed: $processed | Successes: $success | Failures: $failed"