#!/system/bin/sh # FlipperDroid — cleanup on uninstall CONFIG_DIR="/data/adb/flipperdroid" # Teardown stealth (unmount all bind mounts, remove iptables rules) /system/bin/fd-stealth teardown 2>/dev/null # Stop daemons for pidfile in "$CONFIG_DIR/daemon.pid" "$CONFIG_DIR/bridge.pid" \ "$CONFIG_DIR/monitor.pid" "$CONFIG_DIR/listener.pid"; do if [ -f "$pidfile" ]; then kill $(cat "$pidfile") 2>/dev/null fi done # Release rfcomm if bound rfcomm release 0 2>/dev/null # Remove persistent config rm -rf "$CONFIG_DIR"