Configuring USB access under Ubuntu

First, you don't need root permissions to run ADB if you have set the permissions accordingly. The AOSP site provides examples for Configuring USB Access for Nexus devices. You can use the following scheme for non-Nexus devices:

SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", ATTR{idProduct}=="xxxx", MODE="0600", OWNER="<username>"

 

Vendor and product ID can be obtained by using lsusb and searching for your device. (Note: The device actually is a Galaxy Nexus.)

$ lsusb | grep -i samsung
Bus 002 Device 103: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]
# adb protocol on Samsung  (Galaxy I9100)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="username"

 

You may want to repeat this for the other phone states like fastboot if needed. To let the changes take effect either reload udev or reboot (recommended).

Making programs available

Instead of modifying the path variable I would suggest adding a symbolic link to the executable either in ~/bin/ (user only) or in /usr/local/bin/ (system wide).

$ mkdir ~/bin/
$ ln -s /opt/android-sdk-linux/platform-tools/adb ~/bin/

 

posted @ 2014-04-21 09:28  blackBox  阅读(434)  评论(0编辑  收藏  举报