Giter Site home page Giter Site logo

lianquke / android-usb-gadget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tejado/android-usb-gadget

0.0 0.0 0.0 538 KB

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. ๐Ÿ› ๐Ÿ›ก๐Ÿ“ฑ

License: GNU General Public License v3.0

Shell 22.49% Java 1.77% Kotlin 75.74%

android-usb-gadget's Introduction

USB Gadget Tool

USB Gadget Tool Screenshot

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).

Get it on F-Droid

Use-Cases

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.