24

Ubuntu 14.04 doesn't recognize any of my Android devices anymore. (Tried with the Nexus 7 and Galaxy Nexus)

I thought this was an MTP or ADB-problem, but connecting / disconnecting the devices doesn't even change the output of lsusb or dmesg at all.

It's like the devices aren't even plugged-in. However they both charge normally, when I plug them in, so I can't imagine having a cable-problem or a problem with the android devices themselves.

(I've tried it with usb-debugging on and off on both devices - no difference)

  • @MichaelMartinSmucker, can you comment to include your Ubuntu version and any other details? – Anwar Oct 29 '16 at 17:42
  • 2
    @Anwar gladly! Using Ubuntu 16.04. I'm trying 2 different Android phones (2014 Moto X and 2015 Moto X), 2 different USB ports, and I've tried 2 different USB cables. Both of the devices have connected in the past, but now it's intermittent at best. Both devices are in USB Debugging mode. – Michael Martin-Smucker Oct 29 '16 at 18:27
  • Drivers should be in your kernel, but it could be that libmtp has been uninstalled? You can check if it's installed with: dpkg -l | grep libmtp – Johan Schuijt Nov 2 '16 at 10:28
  • try this: abd kill-server and again sudo adb devices. Also do not forget to unlock your device and "Allow" the deivce for USB Debugging. – Techjail Nov 2 '16 at 11:29
  • 1
    Sorry, I was doing a very poor job of monitoring this. Forgot I created the bounty. :P Turns out @Nefta's point #2 (unlock the device, which other people also mentioned) was the real key. I was trying to connect a device with a dead screen, so I didn't notice that it kept locking on me. – Michael Martin-Smucker Nov 5 '16 at 17:31
9
+100

I have problems with my Ubuntu GNOME 14.04 installation recognizing my Nexus 7 at times, too. This is what works for me:

  1. Make sure the cable can transfer information, that it's not just a power cable.
  2. Make sure you have USB debugging enabled.
  3. Unlock your device.
  4. Connect your device to your computer.
  5. Your device should display a pop-up, asking if you want to accept a connection to your computer. (If you had this pop-up before, you might have ticked the "always accept a connection from this device" checkbox.)
  6. Normally, your device should now pop up in your favorite file manager. If it doesn't, check if ADB finds your device. In a terminal, type adb devices (you might need to be root).
  7. If ADB lists your device, go to Settings > Storage and select the options button in the upper right corner:

Upper right hand corner options

  1. Select the file sharing option you want:

File sharing options

  • 1
    You've earned yourself a bounty. Turns out this answer was more complete than I realized, thanks to the reminder to unlock the device. – Michael Martin-Smucker Nov 5 '16 at 17:32
4

if dmesg doesn't report any change, it's definitively a cable problem or in the worst case a problem with the microUSB port of the Android devices

  • 1
    I can confirm that this happens with a working cable as well. If the Android device does not accept an USB connection, not even a golden cable will help :) – BurninLeo Jan 9 '17 at 19:16
4

To set up device detection on Ubuntu Linux:

Log in as root and create this file: /etc/udev/rules.d/51-android.rules.

Use this format to add each vendor to the file:

SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev"

In this example, the vendor ID is for HTC. The MODE assignment specifies read/write permissions, and GROUP defines which Unix group owns the device node.

Now execute:

 sudo chmod a+r /etc/udev/rules.d/51-android.rules

From developer.android.com/studio/run/device.html

3

The problem was ultimately the cable.

Some USB cables are just for charging. Other cables also support data. I tried 3-4 different cables, until one of them ultimately worked.

That was the reason, why connecting the phone didn't even register with dmesg at all.

  • Really Thank you, finally this is my issue LOL. – Anees Hikmat Abu Hmiad Sep 13 '18 at 15:45
  • I had the same issue, and I had forgotten the difference between cables. Usually the cable that comes with the phone works (and has the usb logo in the cable too). – Andrés Parada Sep 18 '18 at 17:28
1

To use the android phones in Ubuntu, developer mode must be enabled.

1.First you must go to setting on your android and scroll down to "About phone." Tap it.

2.Scroll down to the bottom again, where you see "Build number." (Your build number may vary from ours here.)

3.Tap it seven (7) times.

4.After that a new item in the setting appear which is ({}developer options)tap it .... Under debugging you see USB debugging check it now ubuntu 14.04 should see your device enjoy....

  • 2
    They would still be recognized even if USB Debugging is off. – TheWanderer Oct 20 '15 at 0:10
1

As Organic Marble correctly said, you need to create a file /etc/udev/rules.d/51-android.rules with one or more of the following lines:

SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666", GROUP="plugdev" #Acer
SUBSYSTEM=="usb", ATTR{idVendor}=="0b05", MODE="0666", GROUP="plugdev" #ASUS
SUBSYSTEM=="usb", ATTR{idVendor}=="413c", MODE="0666", GROUP="plugdev" #Dell
SUBSYSTEM=="usb", ATTR{idVendor}=="0489", MODE="0666", GROUP="plugdev" #Foxconn
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu
SUBSYSTEM=="usb", ATTR{idVendor}=="04c5", MODE="0666", GROUP="plugdev" #Fujitsu Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="091e", MODE="0666", GROUP="plugdev" #Garmin-Asus
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev" #Google
SUBSYSTEM=="usb", ATTR{idVendor}=="201E", MODE="0666", GROUP="plugdev" #Haier
SUBSYSTEM=="usb", ATTR{idVendor}=="109b", MODE="0666", GROUP="plugdev" #Hisense
SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", MODE="0666", GROUP="plugdev" #HTC
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666", GROUP="plugdev" #Huawei
SUBSYSTEM=="usb", ATTR{idVendor}=="24e3", MODE="0666", GROUP="plugdev" #K-Touch
SUBSYSTEM=="usb", ATTR{idVendor}=="2116", MODE="0666", GROUP="plugdev" #KT Tech
SUBSYSTEM=="usb", ATTR{idVendor}=="0482", MODE="0666", GROUP="plugdev" #Kyocera
SUBSYSTEM=="usb", ATTR{idVendor}=="17ef", MODE="0666", GROUP="plugdev" #Lenovo
SUBSYSTEM=="usb", ATTR{idVendor}=="1004", MODE="0666", GROUP="plugdev" #LG
SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev" #Motorola
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", MODE="0666", GROUP="plugdev" #MTK
SUBSYSTEM=="usb", ATTR{idVendor}=="0409", MODE="0666", GROUP="plugdev" #NEC
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666", GROUP="plugdev" #Nook
SUBSYSTEM=="usb", ATTR{idVendor}=="0955", MODE="0666", GROUP="plugdev" #Nvidia
SUBSYSTEM=="usb", ATTR{idVendor}=="2257", MODE="0666", GROUP="plugdev" #OTGV
SUBSYSTEM=="usb", ATTR{idVendor}=="10a9", MODE="0666", GROUP="plugdev" #Pantech
SUBSYSTEM=="usb", ATTR{idVendor}=="1d4d", MODE="0666", GROUP="plugdev" #Pegatron
SUBSYSTEM=="usb", ATTR{idVendor}=="0471", MODE="0666", GROUP="plugdev" #Philips
SUBSYSTEM=="usb", ATTR{idVendor}=="04da", MODE="0666", GROUP="plugdev" #PMC-Sierra
SUBSYSTEM=="usb", ATTR{idVendor}=="05c6", MODE="0666", GROUP="plugdev" #Qualcomm
SUBSYSTEM=="usb", ATTR{idVendor}=="1f53", MODE="0666", GROUP="plugdev" #SK Telesys
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", MODE="0666", GROUP="plugdev" #Samsung
SUBSYSTEM=="usb", ATTR{idVendor}=="04dd", MODE="0666", GROUP="plugdev" #Sharp
SUBSYSTEM=="usb", ATTR{idVendor}=="054c", MODE="0666", GROUP="plugdev" #Sony
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666", GROUP="plugdev" #Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="2340", MODE="0666", GROUP="plugdev" #Teleepoch
SUBSYSTEM=="usb", ATTR{idVendor}=="0930", MODE="0666", GROUP="plugdev" #Toshiba
SUBSYSTEM=="usb", ATTR{idVendor}=="19d2", MODE="0666", GROUP="plugdev" #ZTE

Source

protected by Community Nov 2 '16 at 21:02

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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