Android - No-name i.onik android tablet not recognized by adb -- adb devices empty
Izzy’s answer is misleading. Two unrelated things were mixed up (the vendor ID list in adb on one side and the permission setup in Linux on the other side).
1) devices considered by adb:
Adb has a hard-coded list of USB vendor IDs it tries. E.g. HTC mobile phones use 0xbb4, which is listed (source file usb_vendors.c), while 0x2207 is not.
The only way to add to this list (without patching the source) is to put vendor IDs in the file $HOME/.android/adb_usb.ini
, line by line. (HOME is set up right?)
No special cable is needed.
2) permission setup for non-root access:
The udev-fiddling is to give user-access to e.g. /dev/bus/usb/002/009 (bus number/device number change; see lsusb
for current values).
The details of this are not relevant to the original poster’s question, as he ran adb as root.
As described in Configuring ADB for Nexus 4 on Ubuntu 11.10, under Linux it is important to be listed in either ~/.android/adb_usb.ini
(user based) or /etc/udev/rules.d/51-android.rules
. Syntax for both files differs: while in the first case it's sufficient to simply add the vendor id (echo 0x18d1 >> ~/.android/adb_usb.ini
for a Nexus 4), the entry for the UDEV rule is a bit more complex. Details can be found in the linked question (or rather its answers).
Im krlmlr's case, it was not an "either-or", but seemingly both parts were needed (I never had that before, and I never even used the adb_usb.ini
-- but that doesn't mean there are no such exceptions). By adding the device in both places (which cannot hurt anyway), the device finally showed up.
Two additional remarks: After changing the UDEV rules, the UDEV service needs to be restarted to accept the changes. On Ubuntu, this can be done via sudo service udev restart
(alternatively, you can simply force UDEV to reload its rules using udevadm control --reload-rules
). If your device is still not detected, it most likely was plugged in while you did the changes; you need to disconnect and reconnect the USB cable then. Of course, USB Debugging must be enabled in your device :)
Example
by krlmlr
Based on the following output of lsusb
for the Android device in question:
Bus 002 Device 009: ID 2207:0010
it was necessary to create /etc/udev/rules.d/51-android.rules
as root
with the following contents:
SUBSYSTEM=="usb", ATTR{idVendor}=="2207", ATTR{idProduct}=="0010", MODE="0660", GROUP="plugdev"
and to create ~/.android/adb_usb.ini
with the following contents:
0x2207
The first is required to allow regular users (that belong to the group plugdev
) to access the device. Note the permission mask 0660
instead of the frequently seen 0666
which is weaker from a point of view of security (the latter allows "world" access, while the former only allows "user and group" access). The second is required so that adb
attempts to talk to the device in the first place. After that:
sudo chmod a+r /etc/udev/rules.d/51-android.rules
sudo udevadm control --reload-rules
adb kill-server
and unplug+plug your Android device. Then,
adb devices
finally showed the Android device.
Remark by Izzy:
For my LG Optimus 4X HD, it was sufficient to add one line to /etc/udev/rules.d/51-android.rules
:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1004", ATTRS{idProduct}=="61a6", MODE="0666" GROUP="androiddev", SYMLINK+="android%n"
Maybe the SYMLINK
option makes the difference that I didn't need the extra entry in ~/.android/adb_usb.ini
.