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
In my case on ubuntu 12.04 LTS, I had to change my HTC Incredible usb mode from charge to Media and then the device showed up under adb. Of course, debugging was already on in both cases.
For those using debian, the guide for setting up a device under Ubuntu to create the file "/etc/udev/rules.d/51-android.rules" does not work. I followed instructions from here. Putting down the same here for reference.
Edit this file as superuser
sudo nano /lib/udev/rules.d/91-permissions.rules
Find the text similar to this
# usbfs-like devices
SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0664″
Then change the mode to 0666 like below
# usbfs-like devices
SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, \ MODE=”0666″
This allows adb to work, however we still need to set up the device so it can be recognized. We need to create this file as superuser,
sudo nano /lib/udev/rules.d/99-android.rules
and enter
SUBSYSTEM==”usb”, ENV{DEVTYPE}==”usb_device”, ATTRS{idVendor}==”0bb4″, MODE=”0666″
the above line is for HTC, follow @grebulon's post for complete list.
Save the file and then restart udev as super user
sudo /etc/init.d/udev restart
Connect the phone via USB and it should be detected when you compile and run a project.
All the provided answers assume that you are able to unplug and reconnect the USB cable. In situations where this is not possible (e.g., when you are remote), you can do the following to essentially do what the suggested udev rules would do on re-plug:
lsusb
Find the device you care about, e.g.:
Bus 003 Device 005: ID 18d1:4ee4 Google Inc. Nexus
Take note of the bus number it is on and then execute, e.g. for bus 003
:
sudo chmod a+w /dev/bus/usb/003/*
Clearly this may be more permissive than you want (there may be more devices attached than just this one), but you get the idea.
Enter the following commands:
adb kill-server
sudo ./adb start-server
adb devices
This happens when you are not running adb server as root.
I had the same problem, the solution is as fellow: (by the way, you don't have to root your device.)
Enjoy.
I used su and it started working. When I use Jetbrains with regular user, I see this problem but after restarting Jetbrains in su mode, I can see my device without doing anything.
I am using Ubuntu 13.04 and Jetbrains 12.1.4