RU

Rooted Android smartphone types like a USB keyboard via f_hid

Published: 2026-10-24 · Author: AI Release · @ai_release1
Rooted Android smartphone types like a USB keyboard via f_hid

⚡ The gist in 5 seconds - The android-hid-kb project has been published: a rooted Android smartphone works as a USB HID keyboard via configfs and f_hid. - Over a cable, the device "types" the contents of any text file into a console or a PC. - The script is built entirely on built-in mksh commands — no external utilities needed; root is required. ### 🔍 What was found A repository, RemiPelloux/android-hid-kb, has appeared on GitHub — a set of scripts that makes a rooted Android smartphone pose as an ordinary USB keyboard. The description explicitly names the stack: configfs + f_hid. That means the phone connects to someone else's computer or console via USB and, from the receiving side's perspective, looks like an HID input device — so it can type text without installing drivers or any software on the target machine. The mechanics rely on the USB gadget framework of the Linux kernel: a gadget configuration is created via configfs, the f_hid function emulating an HID keyboard is loaded into it, and then the script sends characters as keystrokes, chewing through the given text file line by line. One detail worth noting: the code is written exclusively in built-in mksh commands (Android's stock shell), without busybox, coreutils, or any other external binaries — meaning it runs on a "bare" system where nothing needs to be installed. ### 💡 Why it matters Projects like this are a classic tool for anyone working with headless hardware: servers, routers, single-board computers, and consoles that have no keyboard but do have a USB port. A smartphone at hand replaces both the keyboard and the hub, while the role of the "payload carrier" is played by an ordinary text file — all the way up to commands for auto-typing into a recovery console. The price of the convenience is well known: you need root and a kernel with USB gadget function support, which rules out stock firmware.

🤖 AI summary
#Android#root#USB#Linux#хакинг#AI
← PreviousiPhone Duo is on sale, and devs already turned it into a Nintendo DS

Source: github.com · post in Telegram