Android adb permission error
I have installed the Android SDK but Im getting an error while using a hardware device by executing "./adb device $. I am getting this error:
List of devices attached
???????????? no permissions
While I am running "sudo./adb device" there is no error:
List of devices attached
HT019P80XXX device
Adb should work for all users (also when starting eclipse), but it only works as root. Related file permissions:
-rwxr-xr-x 1 root root 72 2012-03-20 09:53 /etc/udev/rules.d/51-android.rules
-rwxr-xr-x 1 ariadna ariadna 159620 2012-03-19 13:45 adb
I have googled and tried different solutions but none works on my Ubuntu, any idea?
thank
source to share
Try to find your device and use it for the user:
In my case Sony Ericsson:
lsusb | grep Sony
Output:
"Bus 001 Device 018 : ID 0fce: 6161 Mobile Communications Sony Ericsson AB"
then change the owner for that device:
sudo chown user:group /dev/bus/usb/001/018
Note 1: If you turn off the device / restart your computer, you will have to change the owner again.
Note 2: you may need to start / restart adb server:
adb kill-server
adb start-server
PS I also couldn't get it to work with the udev rules. I really need this because I am using eclipse which restarts adb without sudo.
source to share
Try editing the appropriate udev line (assuming your device is HTC) as follows:
SUBSYSTEM == "usb", ATTRS {idVendor} == "0bb4", MODE = "0666" GROUP = "plugdev"
Then make sure you are in the "plugdev" group.
BTW You are absolutely right - you absolutely don't need to be root to run adb server. Otherwise, in order to set up a multi-user Android multi-developer environment, you will need to give all developers root privileges or start the adb server at boot time as root, neither of which is very smart. If this is not possible on your system, then it is a bug in udev.