I am using a Samsung galaxy nexus phone (Android 4.0 platform) .
I am developing Android app on Ubuntu linux OS. I would like to run my application
Replace the vendor id of 0bb4 with 18d1 in /etc/udev/rules.d/51-android.rules
Or add another line that reads:
SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666"
I know this might be a little late but here is a very good article on how to manually add Android ADB USB Driver. Manually adding Android ADB USB driver in Ubuntu 14.04 LTS
Edited to Add Link Content
Note: Make sure that you have connected your Android device in USB Debugging mode
Open terminal (CTRL + ALT + T) and enter command:
lsusb
Now you might get a similar reply to this:
Bus 002 Device 013: ID 283b:1024
Note:
With reference to this Bus 002 Device 008: ID 283b:1024
{idVendor}==”283b”
{idProduct}==”1024″
Now enter the following command:
sudo gedit /etc/udev/rules.d/51-android.rules
This creates the android rules file (51-android.rules) or open the existing one in the specified location (/etc/udev/rules.d)
Add a new line to this file:
SUBSYSTEM==”usb”, ATTRS{idVendor}==”283b”, ATTRS{idProduct}==”1024″, MODE=”0666″
Note Edit idVendor & idProduct values with your device values.
Save and close.
Now enter the following command:
sudo chmod a+rx /etc/udev/rules.d/51-android.rules - grant read/execution permission
sudo service udev restart - Restart the udev service
Now we have to add the idVendor to adb_usb.ini. Enter the following commands:
cd ~/.android
gedit adb_usb.ini
Add the following value
0x283b
This is nothing but 0x(idVendor value). So replace the value with. respect to your device value
Save and close the file.
Now enter the following command:
sudo service udev restart
Plug out the Android device and reconnect it again.
Now enter the following command:
adb kill-server
adb devices
There you go! Your device must be listed.
Copied From Manually adding Android ADB USB driver in Ubuntu 14.04 LTS
Worked for me.
What works for me is to kill and start the adb server again. On linux: sudo adb kill-server and then sudo adb start-server. Then it will detect nearly every device out of the box.
There are a lot of bad answers posted to this question ranging from insisting on running adb as root (which should not be touted as the only or even recommended solution) to solving completely unrelated issues.
Here is the single shortest and most universal recipe for taking care of permissions for all adb and fastboot devices at once:
echo 'ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:ff420?:*", MODE="0666"' | sudo tee /etc/udev/rules.d/99-android.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --verbose --action=add --subsystem-match=usb
Or you could use slightly longer version I posted to this gist.
As for the specific thing that OP did wrong in his question - it was not reloading the udev rules after editing the .rules file.
Also OP did not tell which Android build (aka ROM) he had on his phone. The idVendor value is set in software and therefore it depends on the ROM. So the value of 04E8 he used in his original rule would have worked only for devices with Samsung stock ROMs. But this is not a problem for this udev rule - it matches all devices with adb or fastboot interfaces regardless of their VendorID.
I had the same problem with my Galaxy S3.
My problem was that the idVendor value 04E8 was not the right one.
To find the right one connect your smartphone to the computer and run lsusb in the terminal. It will list your smartphone like this:
Bus 002 Device 010: ID 18d1:d002 Google Inc.
So the right idVendor value is 18d1. And the line in the /etc/udev/rules.d/51-android.rules has to be:
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
Then I run sudo udevadm control --reload-rules and everything worked!
You should NOT run adb server as root as other answers are suggesting. Instead if you are using Arch Linux do the following:
android-udev package with PacmanReload udev rules:
# udevadm control --reload-rules
Add yourself to adbusers group and then logout and login:
# usermod -aG adbusers $LOGNAME
Source: https://wiki.archlinux.org/index.php/android#Configuring_adb