Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tejado/android-usb-gadget
Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
https://github.com/tejado/android-usb-gadget
android authorizer ccid configfs ctap ctap2 functionfs gadget hid kernel root smartcard usb usb-devices usb-gadget usb-hid
Last synced: 4 days ago
JSON representation
Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱
- Host: GitHub
- URL: https://github.com/tejado/android-usb-gadget
- Owner: tejado
- License: gpl-3.0
- Created: 2020-07-27T15:58:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T14:52:46.000Z (9 months ago)
- Last Synced: 2025-01-01T00:05:42.115Z (11 days ago)
- Topics: android, authorizer, ccid, configfs, ctap, ctap2, functionfs, gadget, hid, kernel, root, smartcard, usb, usb-devices, usb-gadget, usb-hid
- Language: Kotlin
- Homepage:
- Size: 525 KB
- Stars: 917
- Watchers: 28
- Forks: 70
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - tejado/android-usb-gadget - Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱 (Kotlin)
- awesome-list - tejado/android-usb-gadget - Convert your Android phone to any USB device you like! USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. 🛠🛡📱 (Kotlin)
README
# USB Gadget Tool
Convert your Android phone to any USB device you like!
USB Gadget Tool allows you to create and activate USB device roles, like a mouse or a keyboard. Connected USB hosts (e.g. a normal computer) will then identify your Android device only under that role.
It can also be used to deactivate the standard USB Gadget (including mtp, adb, etc.), e.g. for security reasons.Following USB gadgets are integrated:
* Keyboard & Mouse (/dev/hidg0, /dev/hidg1)
* FIDO CTAP (/dev/hidg0; for WebAuthn)
* CCID (/dev/ccid_ctrl, /dev/ccid_bulk)
* UVC camera (/dev/video?)USB Gadget Tool requires root permissions and a Kernel with ConfigFS support.
Currently the app only enables the USB Gadget. For the usage of these device endpoints (e.g. /dev/hidg0) further apps are required (see Use-Cases).[](https://f-droid.org/packages/net.tjado.usbgadget/)
## Use-Cases
* [Authorizer](https://github.com/tejado/Authorizer)
* [hid-gadget-test](https://github.com/pelya/android-keyboard-gadget)## Features
* Comfortable USB gadget management (listing, adding and activating)
* Adding & activating USB Gadgets during boot
* Adding functions to USB Gadgets
* Device info (Kernel version and available gadgets in Kernel)
* Available in F-Droid store## Roadmap
* Mount of /config if not available
* Alert if ConfigFS is not supported
* Import custom USB Gadget profiles
* Example USB Gadget usage (USB Gadget Tool currently only manages USB Gadgets, not implementations of these)
* Optional telemetry to understand better how all the Android vendors compile their kernel (e.g. what USB Gadgets are available)
* Google Play Store distribution## How does it work?
USB Gadget Tool uses ConfigFS - an userspace API inside the Linux Kernel - for creation of arbitrary USB composite devices.
https://www.kernel.org/doc/Documentation/filesystems/configfs/configfs.txt