mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 15:03:01 +02:00
- Move all linux_configuration scripts into two semantic categories: - single_use/: scripts run once manually (fresh install, fixes, setup) - periodic_background/: scripts run by systemd timers or daemons - Preserve existing subdirectory structure within each category - Fix lib/common.sh source paths for new directory depths - Fix CONFIG_DIR depth in setup_periodic_system.sh and check_and_enable_services.sh - Update all references in tests, fresh-install/main.sh, nix modules, and docs - Fix check_polling_antipatterns.sh false positives (||, regex |, case patterns, jq strings) - Fix pre-existing mypy exclusion path and type annotations for moved tools/ directory - Rewrite check_polling_antipatterns.sh using awk (no bash regex loops); add require_serial: true
17 lines
477 B
Bash
Executable File
17 lines
477 B
Bash
Executable File
#!/system/bin/sh
|
|
# Cleanup when module is uninstalled
|
|
GUARDIAN_DIR="/data/adb/android_guardian"
|
|
|
|
# Only allow uninstall if control file says DISABLED
|
|
if [ -f "$GUARDIAN_DIR/control" ]; then
|
|
status=$(cat "$GUARDIAN_DIR/control")
|
|
if [ "$status" != "DISABLED" ]; then
|
|
echo "Guardian is still enabled! Use ADB to disable first:"
|
|
echo " adb shell 'echo DISABLED > /data/adb/android_guardian/control'"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Clean up guardian data
|
|
rm -rf "$GUARDIAN_DIR"
|