Skip to content
프로젝트

tejado/android-usb-gadget

GitHub에서 보기

소개

Android 휴대전화를 원하는 USB 기기로 바꿔 보세요! USB Gadget Tool을 사용하면 마우스나 키보드 같은 USB 기기 역할을 만들고 활성화할 수 있습니다. 🛠🛡📱

시스템 및 인프라

이 수치를 측정하는 방법

What you can do

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

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+2
in 1 month
+5

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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/hidgN)
  • FIDO CTAP (/dev/hidgN; for WebAuthn)
  • Keyboard & FIDO CTAP combined (/dev/hidgN)
  • 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). A FIDO CTAP gadget is only usable while such an app answers on its node.

The number in /dev/hidgN depends on the order in which HID functions were created across all gadgets, so the gadget's detail page shows the node of each HID function. The kernel allows at most 4 HID functions across all gadgets, including inactive ones.

Keyboard functions set no_out_endpoint where the kernel supports it, because unread LED reports on an OUT endpoint can make hosts such as macOS pause all keyboard input. On other kernels, and for gadgets created by earlier versions, keep something reading the keyboard's node.

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

관련 프로젝트 살펴보기

불러오는 중…