CN

Ubuntu: Adb Command Cannot Find Device

Word count: 833Reading time: 5 min
2014/03/25
loading

This post dates from 2014, when I was using a Nokia X and an old Android SDK. The udev and user-group instructions were updated for Ubuntu 24.04 LTS on 2026-10-13. The old SYSFS rule and Upstart restart procedure no longer apply; the adb_usb.ini workaround remains at the end as a historical note.

1. Problem Overview

Recently, while developing for a Nokia project, I encountered the following issue:

When I plugged in a Nokia X, the computer did not respond at all—it wasn’t recognized. My colleague’s Windows machine also failed to detect it. After searching Google for a long time, I finally found a solution. Since I didn’t record it originally and later forgot how to configure it when helping someone else, I decided to document it here for everyone.

2. Solution

Enable USB debugging on the device and use a cable that supports data transfer. Check the selected Platform-Tools version with adb version, then inspect the connection using adb devices -l.

  • Empty list: check the cable, port, USB debugging setting, and whether the host enumerates the device.
  • no permissions: check Linux udev rules and the current user’s groups.
  • unauthorized: ADB has found the device; unlock it and accept the RSA debugging prompt.
  • offline: the device is not responding normally to ADB; reconnect it or restart the ADB server and inspect the state again.

USB enumeration, host permissions, and device authorization are separate checks. See the ADB reference and hardware-device setup guide.

2.1. Run lsusb

Run lsusb and identify the entry added when the device is connected. The original Nokia X appeared as follows; use the IDs actually reported for other devices:

1
Bus 003 Device 033: ID 0421:06e8 Nokia Mobile Phones

0421 is the vendor ID and 06e8 is the product ID. Neither is a Linux permission mode. USB enumeration alone does not establish ADB authorization.

2.2. Configure udev Rules and User Groups

On Ubuntu, start with the distribution’s rules package. Android’s official setup guide specifies the following package and group; the Ubuntu 24.04 package is in the universe repository:

1
2
sudo apt-get install android-sdk-platform-tools-common
sudo usermod -aG plugdev "$USER"

Log out and back in after changing group membership. Check id for plugdev, then reconnect the device. This package supplies common files and USB rules; continue using the ADB binary from the selected SDK’s Platform-Tools installation.

Add a custom rule only if the distribution’s rules do not cover the device. For the Nokia X above, the rule in /etc/udev/rules.d/51-android-local.rules would be:

1
SUBSYSTEM=="usb", ATTR{idVendor}=="0421", ATTR{idProduct}=="06e8", MODE="0660", GROUP="plugdev"

ATTR{} matches device attributes, MODE sets device-node permissions, and GROUP selects the owning group. This example grants read/write access to root and plugdev, not every user. The rule file itself does not need executable permission. Reload the rules, then unplug and reconnect the device:

1
2
sudo chmod 0644 /etc/udev/rules.d/51-android-local.rules
sudo udevadm control --reload-rules

Reloading does not retroactively change an existing device node; reconnecting generates device events that apply the rules. See systemd’s udev and udevadm manuals for the syntax and reload behavior.

2.3. Restart ADB as the Regular User

Check that the commands refer to the same Platform-Tools installation, then restart the server as the logged-in user:

1
2
3
adb kill-server
adb start-server
adb devices -l

Routine development does not require sudo adb start-server to bypass USB permissions. If a server was previously started as root, stop that process before returning to the regular user. Also check SDK paths so the terminal and Android Studio do not use different ADB versions. Restarting the server interrupts existing ADB connections.

2.4. Historical adb_usb.ini Configuration

My Nokia X needed one more step back then. It still wasn’t recognized after the earlier setup, so I had to add its vendor ID to the old SDK’s ~/.android/adb_usb.ini. I’ve kept that entry below as a record of the workaround; it isn’t needed for the Ubuntu 24.04 procedure above:

1
2
# Historical Nokia X vendor entry for the old Android SDK.
0x0421

For current devices, start with the documented USB debugging, udev, and authorization checks. Windows uses ADB USB drivers rather than Linux udev rules; follow the OEM USB driver instructions.

About Me && Blog

Below is my personal intro and related links. I look forward to exchanging ideas with fellow professionals. “When three walk together, one can always be my teacher!”

  1. Blogger Intro
  2. Blog Content Navigation: A guide for my blog content.
  3. Curated Excellent Blog Articles - Android Performance Optimization Must-Knows
  4. Android Performance Optimization Knowledge Planet: The paid community stopped operating in 2026 and no longer accepts new members; this link preserves its history.

One walks faster alone, but a group walks further together.

Scan WeChat QR Code

CATALOG
  1. 1. 1. Problem Overview
  2. 2. 2. Solution
    1. 2.1. 2.1. Run lsusb
    2. 2.2. 2.2. Configure udev Rules and User Groups
    3. 2.3. 2.3. Restart ADB as the Regular User
    4. 2.4. 2.4. Historical adb_usb.ini Configuration
  • About Me && Blog