# [SOLVED] Android smartphone does not pop up in Thunar

## alogim

I have an LG Optimus 4x HD (lg-p880). Whenever I plug it in (either ina USB 2 or USB 3 port), it does not pop up in Thunar. I tried both with USB debugging turned off and on. When I plug it in I get the following output:

 USB 3 port 

```
Oct 10 18:22:46 gentooser kernel: [ 2664.522274] usb 3-1: new high-speed USB device number 3 using xhci_hcd

Oct 10 18:22:46 gentooser kernel: [ 2664.704511] usb 3-1: New USB device found, idVendor=1004, idProduct=61f9

Oct 10 18:22:46 gentooser kernel: [ 2664.704514] usb 3-1: New USB device strings: Mfr=2, Product=3, SerialNumber=4

Oct 10 18:22:46 gentooser kernel: [ 2664.704516] usb 3-1: Product: Optimus

Oct 10 18:22:46 gentooser kernel: [ 2664.704518] usb 3-1: Manufacturer: LGE

Oct 10 18:22:46 gentooser kernel: [ 2664.704519] usb 3-1: SerialNumber: 015d456d5b67f218

```

 USB 2 port 

```
Oct 10 18:22:56 gentooser kernel: [ 2674.245693] usb 1-1.1: new high-speed USB device number 3 using ehci-pci

Oct 10 18:22:56 gentooser kernel: [ 2674.334775] usb 1-1.1: New USB device found, idVendor=1004, idProduct=61f9

Oct 10 18:22:56 gentooser kernel: [ 2674.334778] usb 1-1.1: New USB device strings: Mfr=2, Product=3, SerialNumber=4

Oct 10 18:22:56 gentooser kernel: [ 2674.334780] usb 1-1.1: Product: Optimus

Oct 10 18:22:56 gentooser kernel: [ 2674.334782] usb 1-1.1: Manufacturer: LGE

Oct 10 18:22:56 gentooser kernel: [ 2674.334783] usb 1-1.1: SerialNumber: 015d456d5b67f218

```

I have both thunar and thunar-volman installed. FUSE (Filesystem in Userspace) support is enabled in the kernel.Last edited by alogim on Tue Oct 10, 2017 7:06 pm; edited 1 time in total

----------

## NeddySeagoon

alogim,

Unlock the phone before you connect it to the PC.

The phone shoud generate a pop up about the USB connection.

Choose MTP/PTP ... you may have other options.

Without that step, the phone will not cooperate with the PC.

----------

## alogim

What do you mean with «unlock the phone»? In the notification bar it says it is «Connected as a media device». It looks like the phone recognizes the connection with the PC, but the PC does not properly recognize the phone.

----------

## NeddySeagoon

alogim,

My android phone will only do USB charging unless its open for use (I could make a call) at the time of connection, then choose the USB mode I want. 

I suppose it stops a random person finding your phone and downloading things unless they can brute force your PIN.

----------

## Roman_Gruber

 *NeddySeagoon wrote:*   

> alogim,
> 
> The phone shoud generate a pop up about the USB connection.
> 
> Choose MTP/PTP ... you may have other options.

 

That is a feature of newer android versions.

--

Have you checked the "hidden" developer options? (Even crappy SAMSUNG tablet has this and this give a quarter of possible options in comparision with aosp) Hint: if possible and over the warranty period, try using a custom rom, these work far better as the shipped operating system in my point of view.

Usually you need to verify that the computer is trusted on your android device, means you should get a popup asking, allow connection of this computer

Without htis verification you will not be able to make a connection

Also proper kernel settings for => https://wiki.gentoo.org/wiki/MTP

--

ARe you able to push / pull with android debug bridge? Are you able to use the shell in your phone with android debug bridge?

--

Have you used a new cable, known working cable? Those micro usb cables are very fragile

--

I suggest you start with android debug bridge and check the shell feature, than do an ls to see the contents of your phone. so you can see if you got permissions using your computer to your phone via the usb cable

--

whats the output of 

```
adb devices
```

----------

## NeddySeagoon

Roman_Gruber,

That's very dangerous advice.

Flashing a custom ROM can brick your phone.  It any case, stock ROMs support PTP/MTP or other options or there would be an outcry from users.

As the phone and PC can see each other, its clear that there is a bi directional data link, so the cable is not at fault.

Please consider the consequences of users following your advice and do not offer such last ditch options until 

all other options have failed. Even then, give a warning about the dangers of proceeding.

-- edit --

You have a PM in your inbox from June 6 that you have not read.  Its important.

----------

## NeddySeagoon

alogim,

Try the Wiki mtpfs page  to see if we can get some debug information.

Please ignore Roman_Gruber until all other avenues have been explored.

----------

## alogim

 FUSE is enabled in the kernel, as I wrote in my first post. 

 sys-fs/fuse is installed, as well as  media-libs/libmtp. 

 I tried two different cables, I know for sure they work. 

 My phone is currently on CyanogenMod 11 ROM, Android version 4.4.4 with kernel 3.1.10-CM+. 

 My kernel is version 4.12.12-gentoo.

 I am now in the process of installing mtpfs:

 

```
sudo emerge --ask sys-fs/mtpfs
```

 Everything looks good, so I proceed as the wiki suggests.

 Uncommented user_allow_other in /etc/fuse.conf.

 Added my user to the plugdev group: 

```
sudo gpasswd -a michael plugdev

Adding user michael to group plugdev
```

 Created a new directory called AndroidDevice in my home: 

```
 mkdir ~/AndroidDevice
```

 When I run mtpfs ~/AndroidDevice it says the folliowing 

```
Device 0 (VID=1004 and PID=61f9) is a LG Electronics Inc. Android phone (ID2).

libusb_open() failed!: Permission denied

LIBMTP PANIC: Unable to initialize device
```

I guess I need to restart. Get back soon.

 Now the above command worked: 

```
Device 0 (VID=1004 and PID=61f9) is a LG Electronics Inc. Android phone (ID2).

Android device detected, assigning default bug flags
```

 It looks as if mtpfs was able to mount my phone in the above-mentioned directory, however, when I open Thunar in my home folder, I get the following error message in a window: 

```
Failed to open directory "michael". Error when getting information for file '/home/michael/AndroidDevice': Transport endpoint is not connected.
```

 Now I unmounted it with fusermount and tried to plug it in with USB debugging turned off. 

```
Device 0 (VID=1004 and PID=631c) is a LG Electronics Inc. Various E and P models.

PTP_ERROR_IO: failed to open session, trying again after resetting USB interface

LIBMTP libusb: Attempt to reset device

Android device detected, assigning default bug flags
```

 It finally succeeds in mounting it, however Thunar display the same error as before.

P.S. I see no unread message dated the 6th of June in my inbox.

----------

## NeddySeagoon

alogim,

The unread message was to Roman_Gruber.

From your last post, it looks like Thunar has the issue, since it all works except Thurnar

I normally use Mate but I have Xfce4 installed too.  I need to make dinner and eat, so I'll poke about in Thunar in an hour or so.

----------

## fedeliallalinea

Thunar use gnome-base/gvfs package, mtp use flag is enabled on it?

----------

## alogim

You would not believe me, but that is exactly what I was checking. Indeed it looks like the mtp flag is disabled in gvfs. I am going to rebuild that package, let's see what is going to happen.

-- EDIT --

It looks like the missing mtp flag was the cause of the problem, now everything works and my phone shows up in Thunar. I would like to thank very very much everyone who helped me, I am really enjoying this community. I  was thinking that maybe this fact should be mentioned on the wiki. Currently, it is reported that «to have Thunar automount MTP devices (and other volumes), [it is necessary to] install the xfce-extra/thunar-volman package», however it should be made clear that you may also require gvfs built with the mtp flag.

----------

## NeddySeagoon

alogim,

The Wiki is a community resource.  Please create an account and clarify the sections that need to be fixed.

There is some protected content there, like the handbooks and project pages.

The rest can be edited by registered users.

----------

