# Enabling Human Interface Device (HID) Support on Android

**Author:** kelexine  
**Date:** 2025-04-22  
**Category:** Android Dev  
**Tags:** Magisk, HID, Android, Kernel, C  
**URL:** https://kelexine.is-a.dev/blog/hid-gadget-module

---

# Unlocking HID Capabilities on Android

One of the most powerful features of the Linux kernel is the ability to act as a USB gadget. For Android power users, this opens up incredible possibilities: using your phone as a physical keyboard, mouse, or game controller for your PC.

However, many stock Android kernels disable this functionality or lack the necessary configuration. That's why I built the **HID Gadget Module**.

## What it does

This Magisk module automates the process of enabling HID support on Android devices. It works by:

1.  **Checking Kernel Support:** Verifies if your device's kernel has `CONFIG_USB_GADGET` and `CONFIG_USB_HID` enabled.
2.  **Patching System Files:** Modifies necessary system configurations to expose the HID interface.
3.  **Providing a Binary:** Includes a helper binary to easily send keystrokes and mouse events from the terminal or other apps (like NetHunter).

## Key Features

*   **Universal Compatibility:** Designed to work on a wide range of devices running Android 10+.
*   **Plug-and-Play:** Just flash via Magisk and reboot.
*   **Developer Friendly:** Written in C for performance and reliability.

## Download

You can grab the latest version directly from the GitHub releases.

[**Download v1.17.0 (Zip)**](https://github.com/kelexine/hid-gadget-module/releases/download/v1.17.0/hid-gadget-module-v1.17.0.zip)

## Source Code

Check out the source code to see how it works under the hood or contribute to the project.

[View on GitHub](https://github.com/kelexine/hid-gadget-module)

---

*This content is available at [kelexine.is-a.dev/blog/hid-gadget-module](https://kelexine.is-a.dev/blog/hid-gadget-module)*
