1

This question describes an equivalent problem with Windows 7. The problem is that adb devices shows no devices, although the latest Android SDK is installed, and USB debugging was turned on in the tablet.

My case is with Android 5.1.1 on a Nexus 9. I gather the problem also exists on other devices. I do not know about other Android versions.

Community
  • 1
  • 1
Brendan
  • 1,995
  • 1
  • 20
  • 35
  • I run Ubuntu and have not experienced this problem with any Nexus device, and I use them a lot. What specific version of Ubuntu and what specific Nexus device have you had problems with? – CommonsWare Feb 19 '16 at 13:07
  • Sorry, meant to click "answer you own question" as I have solved the problem and just wanted to share. Answer now posted. My case is Android 5.1.1 on Nexus 9 and Ubuntu 14.04.3, but the problem appears to also exist on other Nexus devices and AFAIK will manifest with any Linux distro. – Brendan Feb 19 '16 at 13:09
  • :: shrug :: Again, I have been doing Android development on Ubuntu since 2008. I own every Nexus model ever made and have worked with them on Ubuntu. I also teach Android app development, and dozens of my students have used Ubuntu. This is the first that I have heard of this issue -- neither I nor my students have had it (though it's possible a student had it and didn't mention it). I am not disputing that you ran into a problem, but your problem may be tied to something else in your environment (e.g., flaky USB hub). – CommonsWare Feb 19 '16 at 13:16
  • I have only observed the issue after installing AOSP built from source so it is most likely to do with configuration of the Install (which presumably differs in the factory Android binaries). This question may never be useful to anyone but you never know, future me may Google it! – Brendan Feb 19 '16 at 13:20

1 Answers1

0

One solution is to disable MTP on the device:

Settings --> Storage --> Top Left Option (Computer USB Connection) tap--> uncheck "choose MTP"

However this may not be possible if you wish to automate the process.

A workaround solution for Linux is to prevent MTP probes from happening (this allows the Android device to keep appearing as a composite device with both an MTP and ADB interface). The simplest way to do this on Ubuntu is sudo apt get remove libmtp-common libmtp-runtime libmtp9, then reboot. You will no longer be able to use MTP on that computer.

You can use lsusb -v to verify that the MTP/ADB issue is fixed; If you see multiple bInterfaceDescriptors under your device, and one has a bInterfaceSubClass of 66 (0x42), but you still see no entries in adb devices, you have a different problem.

Community
  • 1
  • 1
Brendan
  • 1,995
  • 1
  • 20
  • 35