简体   繁体   中英

Connect android device on ubuntu 12.04

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)

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

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 technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM