Commit 74bafa4fd1a7
Changed files (2)
android
osaka
android/osaka/cleanup-adb.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# One-time ADB setup for osaka (Boox Note Air 4C)
+# Run from desktop with tablet connected via USB
+# These settings persist across reboots
+set -euo pipefail
+
+SERIAL="${OSAKA_SERIAL:-a8a21c0f}"
+ADB="adb -s $SERIAL"
+
+echo "==> Disabling unnecessary packages..."
+for pkg in \
+ com.google.android.tts \
+ com.google.android.apps.restore \
+ com.google.android.configupdater; do
+ echo -n " $pkg: "
+ $ADB shell "pm disable-user --user 0 $pkg" 2>&1
+done
+
+echo ""
+echo "==> Disabling Play Store auto-updates..."
+$ADB shell "settings put global app_auto_update_policy 0"
+
+echo ""
+echo "==> Force-stopping bloat..."
+for pkg in \
+ com.google.android.gms.ui \
+ com.android.vending; do
+ echo -n " Stopping $pkg... "
+ $ADB shell "am force-stop $pkg" && echo "done"
+done
+
+echo ""
+echo "==> Memory after cleanup:"
+$ADB shell "cat /proc/meminfo | head -3"
+
+echo ""
+echo "✅ ADB cleanup complete! These settings persist across reboots."
+echo " On-device cleanup: ~/src/home/android/osaka/cleanup.sh"
android/osaka/cleanup.sh
@@ -0,0 +1,41 @@
+#!/data/data/com.termux/files/usr/bin/bash
+# Clean up background bloat on osaka (Boox Note Air 4C)
+# Frees ~1GB of memory from Google/Play Store services
+# Safe to run anytime — disabled packages stay disabled across reboots
+# Force-stopped packages may respawn, so re-run if memory gets tight
+set -euo pipefail
+
+# One-time setup (requires ADB shell, already done):
+# pm disable-user --user 0 com.google.android.tts
+# pm disable-user --user 0 com.google.android.apps.restore
+# pm disable-user --user 0 com.google.android.configupdater
+# settings put global app_auto_update_policy 0
+# These persist across reboots. Re-run via ADB only if factory reset.
+
+echo "==> Checking disabled packages..."
+for pkg in com.google.android.tts com.google.android.apps.restore com.google.android.configupdater; do
+ short="${pkg##*.}"
+ if pm list packages -d 2>/dev/null | grep -q "$pkg"; then
+ echo " ✓ $short disabled"
+ else
+ echo " ✗ $short NOT disabled (run cleanup-adb.sh from desktop)"
+ fi
+done
+
+echo ""
+echo "==> Force-stopping background bloat..."
+for pkg in \
+ com.google.android.gms.ui \
+ com.android.vending; do
+ echo -n " Stopping $pkg... "
+ am force-stop "$pkg" 2>/dev/null && echo "done" || echo "skipped"
+done
+
+echo ""
+echo "==> Memory status:"
+FREE=$(cat /proc/meminfo | awk '/^MemFree:/{print int($2/1024)}')
+AVAIL=$(cat /proc/meminfo | awk '/^MemAvailable:/{print int($2/1024)}')
+echo " Free: ${FREE}MB Available: ${AVAIL}MB"
+
+echo ""
+echo "✅ Cleanup complete!"