3

Ubuntu is not showing my android device.

I tried to install libmtp* mtp* and also reinstalled it And also try to put device information in udev.rules' relevant file

Robert Houghton
  • 1,202
  • 16
  • 28
MEHUL09
  • 49
  • 1
  • 1
  • 4

4 Answers4

6

try installing mtpfs

sudo apt-get install mtpfs

and install mtp-tools

sudo apt-get install mtp-tools

if you have installed mtpfs and your device is still not recognized ( enable mtp mode on your device ) run mtp-detect

the output should look like this :

Listing raw device(s)

Device 0 (VID=1234 and PID=5678) is ...

followed by specific phone information

the udev editing can be done like :

open /etc/udev/rules.d/69-libmtp.rules with root. if this file does not exist yet copy it from /lib/udev/rules.d/69-libmtp.rules

in this file you add the following line ( with adapted vid, pid, ... )

ATTR{idVendor}=="1234", ATTR{idProduct}=="5678", SYMLINK+="libmtp-%k", MODE="660", GROUP="disk", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

and reload udev

ralf htp
  • 9,149
  • 4
  • 22
  • 34
  • This worked but I have to change my USB setting on the phone away from MTP (eg. MIDI), unplug the USB cable and back to MTP and plug the USB cable back in. The "Android" Nautilus window on ubuntu 16.04 LTS then pops up with "Internal storage" and "Sandisk SD card". – yoyoma2 Oct 08 '19 at 21:45
1

This might be a simpler fix, it's what worked for me:

sudo apt install mtp-tools

Now plug in your Android phone via USB, cable matters so if one doesn't work try another.

mtp-detect

Done. Open up your Files app or terminal and transfer away!

Robert Houghton
  • 1,202
  • 16
  • 28
1

For anyone coming here for Ubuntu 18.04 like me, other answers didn't work. What did:

  • Turn off USB debugging.
  • Use USB to transfer files

Also, after doing this, android studio had some trouble recognizing the device even after switching debugging back on. Switching USB Preferences >> Use USB for "File Transfer" to "PTP" worked.

Kai Ism
  • 61
  • 2
0

Use resetter software and reset libmtp* ,mtp* and other like jmtpf* from custom reset option (last one)

Dawnlode from Here https://github.com/gaining/Resetter

Or get .deb file from here https://github.com/gaining/Resetter/releases/tag/v1.1.2-stable

Extract it, install it and run

sudo resetter

In terminal and do above things

MEHUL09
  • 49
  • 1
  • 1
  • 4
  • Not sure what this does but if it unintalls gvfs* packages that are not from your official repo, but the ones of your updated Ubuntu version... and installs the official ones, that would be good and after reboot seems to fix it. – NoBugs Mar 03 '19 at 09:10
  • Any command line equivalent without requiring external software (in ubuntu 20.04)? – nutty about natty Oct 08 '21 at 07:47