
Turns any rooted phone into the legendary USB Rubber Ducky. Android USB HID Keystroke Injector
Open-source DuckyScript runner for rooted Android with USB Gadget (ConfigFS) support
TapDucky lets you create, customize, schedule, and run DuckyScript on Android by emulating a USB keyboard, mouse, or composite HID device for authorized testing and automation. It includes payload parameterization, multiple scheduler triggers, execution logs, and a GitHub-backed payload library with automatic DuckyScript validation and optional Digispark .ino conversion.
.ino sketches when possible.Note: A rooted device with Linux USB gadget (ConfigFS) support is required. Use a physical device as emulators cannot validate HID behavior.
Payload Editor & Parameters
GitHub Payload Store
Execute & Test
Scheduler & Triggers
Device & HID Profiles
Logs & History
org.kaijinlab.tap_ducky/gadget
checkRoot, checkSupport, listUdcs, getStatus, getDiagnosticsgetKeyboardLayouts, setKeyboardLayout, resolveKeyboardLayoutId, setKeyboardLayoutByCodeactivateProfile, deactivate, panicStop, retryOpenHidWritersTapDucky includes a full DuckyScript-style engine implemented natively on Android (Kotlin) with expression evaluation and structured control flow. It supports keyboard, mouse/pointer, timing, variables/defines, functions, and simple randomness utilities.
Supported command families (high level):
Notes on behavior:
Mouse/Pointer syntax quick reference:
Capability matrix (selected):
Note: The validator surfaces syntax issues, unknown commands, and structure errors before execution. See the Payload Editor for in-UI validation results with line numbers.
Execution timing highlights:
Note: In addition to the listed aliases, TapDucky accepts snake_case forms like down_arrow, up_arrow, left_arrow, right_arrow, page_up, page_down, print_screen, scroll_lock, num_lock, caps_lock, string_delay, default_delay, etc. These are normalized internally.
Modifiers (left/right variants supported where noted):
System/navigation keys (aliases included):
Function keys:
Numpad keys (aliases included):
Media keys (aliases included):
Alphanumeric shortcuts:
Install the application:
Launch and Configure:
owner/repo or full URL with branch/path).
Contributions are welcome! If you'd like to help improve TapDucky:
This project is licensed under the GNU GPLv3 License. See LICENSE.
If you encounter any issues or have questions, please open an issue on the GitHub repository or contact the maintainer.
executeDuckyScript(script, delayMultiplier, executionId?), cancelExecution(executionId)testKeyboardKey(label), testMouseMove(dx,dy,wheel,buttons), testCtrlAltDel()org.kaijinlab.tap_ducky/gadget_logsorg.kaijinlab.tap_ducky/gadget_statusorg.kaijinlab.tap_ducky/gadget_exec| Feature group | Sub-feature | Supported | Notes |
|---|
| Text/timing | STRING / STRINGLN / STRING_DELAY | ✅ | Per-char timing for STRING_DELAY; global delay via DEFAULTDELAY |
| Text blocks | STRING/STRINGLN blocks | ✅ | Multiline blocks terminated by END_STRING / END_STRINGLN |
| Timing | DELAY, DEFAULTDELAY/DEFAULT_DELAY | ✅ | DEFAULT applies after each executable step |
| Repeat | REPEAT N | ✅ | Duplicates the previous command N times |
| Comments | REM, REM_BLOCK/END_REM | ✅ | Non-executable |
| Modifiers | GUI/WIN, CTRL, ALT, SHIFT combos | ✅ | Parsed as a single combo step |
| Key commands | Explicit key names | ✅ | All keys/aliases listed in “Explicit key and alias support” |
| Hold/release | HOLD, RELEASE | ✅ | Tracks held set; pairs with INJECT_MOD |
| Explicit key state | KEYDOWN, KEYUP | ✅ | Direct key down/up control for combos and held keys |
| Injected modifiers | INJECT_MOD | ✅ | Persisting modifier mask until cleared |
| Mouse/pointer | MOUSE/POINTER CLICK/HOLD/DRAG/MOVE/SCROLL | ✅ | Relative motion with repeat counts |
| Control flow | IF/ELSE IF/ELSE/END_IF | ✅ | Nested chains supported |
| Loops | WHILE/END_WHILE | ✅ | Condition evaluated with expression engine |
| Functions | FUNCTION/END_FUNCTION, CALL/CALL_FUNCTION, RETURN | ✅ | Supports arguments; RETURN sets $? |
| Variables | VAR $name = expr | ✅ | Integers, 0..65535 stored; $? is exit code; scoped locals |
| Defines | DEFINE NAME value | ✅ | Simple text substitution before parse |
| Error handling | TRY/CATCH/END_TRY | ✅ | Recoverable failures without aborting script |
| Waits | WAIT_FOR, SLEEP_UNTIL | ✅ | Host/UDC/keyboard readiness + timed waits |
| Random | RANDOM_* generators | ✅ | Lower/upper/letter/number/special/char |
| Attack modes | ATTACKMODE | ⚠️ | Parsed, but no backend handler is implemented yet |
| 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 | Experiment with USB gadget functionality (hardware‑adjacent, low‑level). |
| TapDucky | A security/testing tool for controlled keystroke injection workflows. |
| HIDWiggle | A mouse jiggler built with USB gadget functionalities. |
| AKTune | Adaptive Android kernel auto‑tuner for CPU/GPU/scheduler/memory/I/O. |