#!/system/bin/sh # CellGuard — cleanup on uninstall CONFIG_DIR="/data/adb/cellguard" PID_FILE="$CONFIG_DIR/webui.pid" # Stop WebUI server if [ -f "$PID_FILE" ]; then kill $(cat "$PID_FILE") 2>/dev/null fi # Release the kernel-enforced RAT lock before unloading so the modem # can return to user-selected preference instead of being stuck. if [ -c /dev/cellguard ]; then echo "release" > /dev/cellguard 2>/dev/null fi # Unload kernel module lsmod 2>/dev/null | grep -q cellguard && rmmod cellguard 2>/dev/null # Remove persistent config rm -rf "$CONFIG_DIR"