Open-source ConfigFS USB gadget manager for rooted Android devices
GadgetFS lets you create, configure, activate, and tear down USB HID gadget roles from Android. It provides profile-based Keyboard, Mouse, and Composite configurations, descriptor editing, UDC binding control, quick HID tests, diagnostics, and native logs for low-level USB gadget workflows.
- ConfigFS gadget provisioning:
- Creates USB gadget directories, string descriptors, configurations, and HID functions through privileged shell scripts.
- Built-in HID roles:
- Mouse, Keyboard, and Composite Keyboard + Mouse profiles.
- Descriptor control:
- Configure VID/PID, manufacturer, product, serial number, and activation behavior per profile.
- Deterministic lifecycle:
- Activate, deactivate, clean up, and panic-stop gadgets with live status updates.
- Diagnostics-first design:
- Inspect root state, ConfigFS paths, UDCs, active gadget state, HID device nodes, and backend logs.
Note: GadgetFS requires root and a physical Android device whose kernel supports USB gadget mode through ConfigFS. Emulators cannot validate USB gadget behavior.
-
Profile Management
- Create, edit, duplicate, and delete gadget profiles.
- Choose Mouse, Keyboard, or Composite role.
- Persist profiles on-device.
- Optional Activate on Open behavior for repeat workflows.
-
USB Descriptors
- Configure vendor ID, product ID, manufacturer, product, and serial number.
- Use an embedded
usb.idsdatabase to look up known vendors and products. - Keep role-specific descriptor settings separate across profiles.
-
Gadget Lifecycle
- Bind and unbind a selected profile to an available UDC.
- Clean up ConfigFS artifacts during deactivation.
- Panic Stop performs best-effort unbinding of active/conflicting gadgets.
- Foreground service keeps the active gadget alive while the app is backgrounded.
-
Quick HID Tests
- Send keyboard key reports.
- Send mouse movement reports.
- Send Ctrl+Alt+Del for validation.
- Test controls adapt to the active role.
-
Diagnostics & Logs
- Root availability, ConfigFS support, UDC list, active state, bound gadgets, and HID writer readiness.
- Native log stream with timestamps for provisioning, binding, cleanup, and report writes.
- Device info screen for hardware, OS, runtime, and GadgetFS status.
- Rooted Android device with a working
suimplementation. - Linux USB Gadget and ConfigFS support in the device kernel.
- A UDC exposed under
/sys/class/udc. - ConfigFS mounted under
/sys/kernel/config/usb_gadgetor/config/usb_gadget. - HID gadget support that can create device nodes such as
/dev/hidg*. - A physical USB data connection to the host. Charge-only cables will not work.
- Download the latest APK from Releases:
-
Install the application:
- Enable installation from unknown sources if needed.
- Grant root when prompted by your root manager.
-
Launch and configure:
- Open GadgetFS.
- Confirm root and USB gadget readiness on the dashboard.
- Create or select a profile.
- Activate the profile and verify enumeration on the connected host.
- Connect the Android device to the host with a data-capable USB cable.
- Open GadgetFS and confirm root, ConfigFS, and UDC readiness.
- Select a Mouse, Keyboard, or Composite profile.
- Review the VID/PID and USB strings.
- Tap Activate.
- Use quick tests to confirm that the host receives HID reports.
- Open Profiles.
- Add or edit a profile.
- Choose the role and set descriptor fields.
- Save the profile.
- Activate it from the dashboard when needed.
- Open Diagnostics or Logs when a gadget does not enumerate.
- Check root, UDC, ConfigFS path, bound gadget, and HID node details.
- Use Deactivate for normal cleanup.
- Use Panic Stop when a stale gadget remains bound or the host state is stuck.
- Mouse:
- Creates a relative HID mouse function.
- Sends 4-byte mouse reports for movement, wheel, and button tests.
- Keyboard:
- Creates a boot keyboard HID function.
- Sends 8-byte keyboard reports for key and combo tests.
- Composite:
- Creates keyboard and mouse functions under one gadget configuration.
- Useful when the host should enumerate both input devices at once.
Configurable USB fields:
idVendoridProduct- Manufacturer string
- Product string
- Serial number
- Activate on Open behavior
Prerequisites:
- Flutter stable toolchain
- Android SDK configured for Flutter
- A rooted physical Android device for runtime validation
Steps:
flutter pub get
flutter runRelease builds:
- Configure a proper release signing setup before publishing.
- The current Gradle release build uses debug signing for local convenience.
- Root check fails:
- Verify Magisk/SU policy and grant root to GadgetFS.
- No UDC found:
- Confirm
/sys/class/udccontains a controller and the device supports USB device mode.
- Confirm
- Host does not enumerate the gadget:
- Use a data cable, try another USB port, and validate VID/PID and role descriptors.
- HID devices are missing:
- The kernel or ROM may not include the required HID gadget functions.
- Gadget remains bound after a crash:
- Use Panic Stop, then reconnect USB if needed.
- GadgetFS changes how the Android device presents itself over USB while active.
- Root access and ConfigFS writes can affect ADB, charging behavior, and other USB gadget functions.
- Use it only on systems you own or are authorized to test.
Contributions are welcome. If you add roles, descriptors, lifecycle behavior, or diagnostics, please include matching UI validation and focused tests where practical.
This project is licensed under the GNU GPLv3 License. See LICENSE.
If you encounter issues or have device compatibility notes, open an issue on the GitHub repository.
| App | What it does |
|---|---|
| IR Blaster | Control and test infrared functionality for compatible devices. |
| USBDevInfo | Inspect USB device details and behavior to understand what's connected. |
| GadgetFS | Manage rooted Android USB gadget roles with ConfigFS. |
| TapDucky | Run controlled DuckyScript HID workflows on supported rooted devices. |
| HIDWiggle | Keep a connected host awake with Android-powered USB HID mouse movement. |
| AKTune | Adaptive Android kernel auto-tuner for CPU/GPU/scheduler/memory/I/O. |