Initial commit — FlipperDroid v0.1.0-poc

KernelSU module + Flipper Zero FAP that bridges both devices into a
unified pentesting platform over USB CDC serial / BT rfcomm.

Android side: bridge daemon, WebUI (:8089), bind mount namespace
isolation stealth engine. Flipper side: proper FAP with 4-view GUI,
GPIO/SubGHz/IR/file command handlers, async event streaming.
This commit is contained in:
sssnake
2026-03-31 21:26:58 -07:00
commit be81a92d44
22 changed files with 4191 additions and 0 deletions

53
post-fs-data.sh Normal file
View File

@@ -0,0 +1,53 @@
#!/system/bin/sh
# FlipperDroid — early boot setup
# Sets up USB gadget and config directory
MODDIR=${0%/*}
CONFIG_DIR="/data/adb/flipperdroid"
CONFIG_FILE="$CONFIG_DIR/config.sh"
mkdir -p "$CONFIG_DIR/logs"
mkdir -p "$CONFIG_DIR/scripts"
if [ ! -f "$CONFIG_FILE" ]; then
cat > "$CONFIG_FILE" << 'DEFAULTS'
# FlipperDroid configuration — persisted across reboots
# Connection mode: usb | bluetooth | auto
CONN_MODE=auto
# WebUI port
WEBUI_PORT=8089
# Auto-connect on boot
AUTO_CONNECT=1
# Bridge protocol baud rate (USB CDC ignores this, BT serial uses it)
BAUD_RATE=115200
# Enable Flipper subsystems to expose
ENABLE_GPIO=1
ENABLE_SUBGHZ=1
ENABLE_RFID=1
ENABLE_NFC=1
ENABLE_IR=1
ENABLE_IBUTTON=1
ENABLE_BADUSB=0
# CPU sharing — allow Flipper to offload compute to phone
CPU_SHARE=1
CPU_SHARE_THREADS=2
# Logging level: 0=off, 1=errors, 2=info, 3=debug
LOG_LEVEL=2
DEFAULTS
fi
source "$CONFIG_FILE"
# Ensure USB ACM gadget is available for Flipper CDC
if [ -d /config/usb_gadget ]; then
# Don't reconfigure, just ensure the CDC ACM function exists
# The kernel handles Flipper Zero as /dev/ttyACM* automatically
echo "FlipperDroid: USB gadget ready" > /dev/kmsg 2>/dev/null
fi