I want try my application on a chinese device with android.

I try to

lsusb shows :

Bus 001 Device 04: ID 18d1:0002 Google Inc.

In /etc/udev/rules.d/51-android.rules I put :

SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0660"

But it doesn't work.

I can't see my device with adb devices (usb debug is enabled)

有帮助吗?

解决方案 2

I had this case one, try to change your 51-android.rules by :

SUBSYSTEM=="usb", ATTRS{idVendor}=="18d1", MODE="0666"

and restart adb

edit : to restart adb adb kill-server then adb devices

其他提示

The answer of Goo is basically correct, but not best practice.

SUBSYSTEM==”usb”, ATTR{idVendor}==”18d1″, MODE=”0660″, GROUP=”plugdev”

is a better way to achieve it, because the rights are granted for the group plugdev and not for everyone.

Afterwards add your user to the plugdev group with this command:

sudo adduser [username] plugdev

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top