Open-source project
M0Rf30/android-udev-rules avatar
M0Rf30/android-udev-rules

M0Rf30/android-udev-rules for Linux Android Debug Bridge access

Android udev rules list aimed to be the most comprehensive on the net

1,355 stars448 forksShellGPL-3.0

At a glance

What is it?
M0Rf30/android-udev-rules provides a systemd-based Linux installation path for the udev rules needed to recognize supported Android devices through ADB. It is aimed at GNU/Linux users who need direct USB debugging access and can tolerate manual distribution-level setup.
Who is it for?
Adopt this repository if you use a GNU/Linux system with systemd, need Android USB debugging through ADB, and prefer a documented rules file to configuring device permissions yourself. Do not adopt it if you use Arch Linux and already follow the Arch wiki instructions, or if you need a plug-and-play solution outside the documented environment.
Can I use it commercially?
Yes, with conditions. GPL-3.0 is a copyleft licence: if you distribute software that includes it, you must release that software's source code under the same licence. Running it internally without distributing it does not trigger that obligation.
Is it still maintained?
Yes. The repository last received commits 11 days ago.
What is it written in?
Mainly Shell, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 20, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What android-udev-rules solves

M0Rf30/android-udev-rules addresses a Linux permission and device-recognition problem around Android Debug Bridge. The README links its rules to Android Studio's guidance for running apps on a hardware device and says the file includes suggestions from the Arch Linux and GitHub communities. In practical terms, the repository is for a developer who wants Linux to expose a supported Android device to ADB over USB rather than treating it as an unknown USB device.

The project is a rules list, not an Android emulator, an ADB replacement, or a general-purpose USB driver package. Its core artifact is `51-android.rules`. The accompanying `android-udev.conf` and `install.sh` files turn that rules list into an installation path that also defines the `adbusers` group and restarts the relevant services. The README's verification step is `adb devices`, so the intended result is visible through the existing ADB tooling after installation.

The documentation specifically assumes a GNU/Linux distribution with systemd for the general installation instructions. Arch has a separate path that points to the Arch wiki and says cloning this repository is unnecessary. That distinction matters because the repository does not present itself as a universal Linux driver installer. Its documented audience is narrower: users who need the permissions and device rules required for Android USB debugging and are willing to install system files under `/etc/udev/rules.d/`.

The rules file and system setup flow

Based on the repository layout, installation has two layers. First, `51-android.rules` is copied or linked into `/etc/udev/rules.d/`, where udev can consult it when handling matching devices. Second, `android-udev.conf` is copied into `/usr/lib/sysusers.d/` and processed by `systemd-sysusers`. The README says this adds the `adbusers` group if it does not already exist. The current user is then added to that group with `gpasswd -a`.

The data path is therefore system configuration rather than application code. A matching Android USB device produces a udev event, the installed rule assigns the relevant device permissions, and the group setup gives the user a way to access the device. After the rules are reloaded, the README restarts the ADB server and asks the user to reconnect the phone. The final `adb devices` command is the external check that ADB can see the device.

The repository also offers a symlink installation choice. A copied file is a direct installation. A symlink points `/etc/udev/rules.d/51-android.rules` back to the checked-out file, which the README describes as the option to use when rules should be updated through git. Neither choice changes the documented verification sequence. The README does not describe a database migration, rollback procedure, or a separate device-specific configuration file beyond these repository artifacts.

Installing the rules on a systemd GNU/Linux system

The following is the README's manual installation path. It changes system configuration, so the commands use `sudo` where the README does. The reader should run them from a terminal on the target GNU/Linux system and should expect the rules file and `android-udev.conf` to be placed in the system directories shown below.

sh
git clone https://github.com/M0Rf30/android-udev-rules.git
cd android-udev-rules

These commands fetch the repository and enter its directory. The next step can either copy the rules file or create a symlink. The README presents both as installation choices rather than requiring both.

sh
sudo cp -v 51-android.rules /etc/udev/rules.d/51-android.rules
sudo chmod a+r /etc/udev/rules.d/51-android.rules

This version installs a standalone rules file and makes it readable. The README also documents a symlink for git-based updates.

sh
sudo ln -sf "$PWD"/51-android.rules /etc/udev/rules.d/51-android.rules

After either rules-file choice, install the sysusers configuration and add the current user to `adbusers`.

sh
sudo cp android-udev.conf /usr/lib/sysusers.d/
sudo systemd-sysusers
sudo gpasswd -a $(whoami) adbusers

The group membership change may require a new login session before it affects the current user. The README then reloads udev, restarts its systemd service, and restarts the ADB server.

sh
sudo udevadm control --reload-rules
sudo systemctl restart systemd-udevd.service
adb kill-server

The repository also documents an automatic path: clone the repository and run `install.sh` as root. The README does not list the contents or flags for that script, so the manual commands above are the more transparent documented route.

Verifying ADB access with a real device

The final step in the README is deliberately small. Reconnect the Android device, enable USB debugging in developer options, and run the existing ADB client. The command does not come from a separate wrapper in this repository. It is the normal interface against which the installed udev permissions and group configuration are checked.

sh
adb devices

The README says the device should now appear. If it does not, the documented information does not provide a diagnostic tree beyond checking the installation commands, reconnecting the device, and confirming that USB debugging is enabled. It also does not document behavior for vendor IDs, phones with unusual USB modes, or distributions that do not use `systemd-udevd.service`. Those cases should not be treated as supported by this README without checking the upstream Android and distribution documentation.

The symlink option has a specific operational consequence. It keeps the system rules file connected to the checkout, which is useful when changes are managed with git, but it also means that deleting or moving the checkout would leave a broken link at the system path. The README recommends the symlink for git updates, yet it does not provide an uninstall or cleanup command. The copy option is more self-contained for users who do not need checkout-based updates.

Where the repository leaves maintenance and upgrades to the user

The repository is not archived, and its last push was on 2026-10-12. Recent release entries include `20260922`, dated 2026-09-22, `20260423`, dated 2026-04-23, and `20250525`, dated 2025-05-25. The project is primarily a Shell repository with a data-like rules file, so an upgrade generally means obtaining a newer rules file and reinstalling or updating the system copy. The README does not document a package-manager release channel, automatic update mechanism, or compatibility matrix for distributions.

The installation instructions also have a maintenance cost. A copied rules file must be replaced manually when a newer version is selected. A symlink can reflect changes in the checkout, but the checkout must remain present. In either case, the README asks for administrative actions that can affect the host system: changing files under `/etc/udev/rules.d/`, adding a group definition under `/usr/lib/sysusers.d/`, changing group membership, reloading udev, and restarting `systemd-udevd.service`. The project does not describe a rollback command or a test suite for undoing these changes.

The GPL-3.0 license governs the repository's distribution terms. That does not by itself answer whether a particular system integration is appropriate for a given organization. Anyone considering redistribution or incorporation should read the repository's `LICENSE` file and assess its obligations directly.

Limits of the documented scope and the alternative path

The clearest limitation is environmental. The manual instructions assume GNU/Linux with systemd and refer specifically to `systemd-udevd.service`, `udevadm`, and `systemd-sysusers`. The project does not document macOS, Windows, containers without host USB access, or Linux environments that use another service manager. The rule file may still be relevant to some Linux systems, but the README does not establish support for them.

The second limitation is diagnostic scope. `adb devices` is a useful final check, but the README does not explain how to identify which rule matched a device, how to inspect permissions, or how to recover from an incorrect rule. It also does not claim that every Android device will work. The description calls the list comprehensive, but the README does not provide a device inventory or a guaranteed compatibility table.

Arch Linux has a documented alternative approach that is part of this repository's instructions rather than a competing product. The README says Arch users should follow the Arch wiki instructions for connecting a device and says there is no need to clone this repository. That path avoids this project's manual system-file installation when the distribution's own setup already covers the requirement. For other GNU/Linux systems, the distinction is practical: distro-packaged rules may be managed by the distribution, while this repository gives you a specific file and commands to install it yourself.

Editorial conclusion

Adopt this repository if you use a GNU/Linux system with systemd, need Android USB debugging through ADB, and prefer a documented rules file to configuring device permissions yourself. Do not adopt it if you use Arch Linux and already follow the Arch wiki instructions, or if you need a plug-and-play solution outside the documented environment. The first verification should be whether your distribution and Android device follow the README's udev and ADB path, then confirm that adb devices lists the device after USB debugging is enabled.

Frequently asked questions

How do I install android-udev-rules on a GNU/Linux system with systemd?

Clone the repository, copy `51-android.rules` to `/etc/udev/rules.d/51-android.rules`, install `android-udev.conf` through `systemd-sysusers`, add your user to `adbusers`, then reload udev and restart the ADB server. The README provides the exact command sequence for this path.

Can I use android-udev-rules on Arch Linux?

The README says Arch users should follow the Arch wiki instructions for connecting a device and says there is no need to clone this repository. The automatic installation path is also documented as cloning the repository and running `install.sh` as root.

How do I verify that an Android device is recognized after installing android-udev-rules?

Reconnect the device, make sure USB debugging is enabled in developer options, and run `adb devices`. The README says the device should appear in the output.

Official sources

  1. Issues
  2. License: GPL-3.0
  3. M0Rf30/android-udev-rules on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/m0rf30-android-udev-rules.svg)](https://hysenlabs.com/projects/m0rf30-android-udev-rules)

Was this useful?