mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-04 16:43:05 +02:00
17 lines
468 B
Bash
Executable File
17 lines
468 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"
|