Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm trying to deploy and test an Android app on my Nexus 4 from my Ubuntu 11.10 computer, but ADB doesn't recognize it. I think I need the Google USB drivers, but I cannot find instructions on how to install them on Ubuntu.

How can I install the drivers on Ubuntu 11.10 so that ADB will recognize my N4?

share|improve this question
add comment

3 Answers 3

You don't need any special drivers -- all you need is to make your device known. A few simple steps can accomplish this when your device is connected via USB:

sudo lsusb
[...]
Bus 002 Device 054: ID 18d1:4e22 Google Inc. Nexus S (debug)

See the two hex values separated by a colon: 18d1:4e22 This is the manufacturerID:deviceID you need to tell the system to handle. So as root:

sudo su -
cd /etc/udev/rules.d
vi 51-android.rules

In this file, add a line (you can use the editor of your choice, of course -- my example uses vi)

# MyDeviceName
SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4e22", MODE="0666" GROUP="androiddev", SYMLINK+="android%n"

This example uses the values from above lsusb output -- you need to replace them by yours. Now, to let your changes take effect:

sudo service udev reload

Final step: Disconnect your device, and reconnect it. It should be recognized now.

share|improve this answer
add comment

Download and install Android SDK for Linux. It comes with generic adb driver.

Here's the Ubuntu guide.

The reason why re-installing the SDK is essential is that the list of USB Vendor IDs which ADB recognizes as android devices is hard-coded into the ADB binary itself. To update the list you should either install(update to) the latest SDK version or add your device manually to ~/.android/adb_usb.ini

To add your vendor ID to the file run

echo 0x18d1 >> ~/.android/adb_usb.ini
share|improve this answer
    
No need for that, Alex. I didn't do that on my Ubuntu machine, and all my devices connect fine after I did above adjustments (and no, I did never install the SDK -- I just use the adb binary shipping with the QtADB stuff). Furthermore: OP states ADB doesn't recognize it. Hm, to me this looks like he already had the SDK installed ;) –  Izzy Feb 11 '13 at 23:47
    
@Izzy, The only thing that the udev rule you posted is doing is changing the default permission for the adb device so users other than root are allowed to start the adb server. It is easy to check if that's the culprit - just start the adb server with sudo and see if that alleviates the issue. –  Alex P. Feb 11 '13 at 23:53
    
OK, so why should one install the SDK then to make it work? As for the Nexus in my example, I didn't even need to add an UDev rule, it simply worked. –  Izzy Feb 12 '13 at 0:03
    
Well the actual purpose of installing SDK is to provide platform-tools (i.e. adb itself). Under Linux ADB is using libusb and does not need any special drivers. The reason I suggested to install the SDK is that it does come with a nice installation guide I linked. –  Alex P. Feb 12 '13 at 0:13
1  
You can create the file if it's missing. The format is simple - just one Vendor ID in hex per line. –  Alex P. Feb 13 '13 at 0:02
show 4 more comments

As explained at Enable developer options in Android 4.2 on Nexus 4 and Galaxy Nexus you need to activate developer mode.

Step 1: Pull down the notifications panel on your device’s interface and tap on Settings.

Step 2: Next, scroll all the way down and tap on About Phone, and you will notice a segment detailing your device’s build number.

Step 3: Repeatedly tap on Build Number (seven taps should do the trick) until you’re met with a message that reads: “you are now a developer!”

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.