Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Android smartphone does not pop up in Thunar
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 124

PostPosted: Tue Oct 10, 2017 4:26 pm    Post subject: [SOLVED] Android smartphone does not pop up in Thunar Reply with quote

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
    Code:
    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
    Code:
    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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 4:36 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 124

PostPosted: Tue Oct 10, 2017 4:38 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 4:49 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Oct 10, 2017 5:03 pm    Post subject: Reply with quote

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

Code:
adb devices
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 5:12 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.


Last edited by NeddySeagoon on Tue Oct 10, 2017 5:28 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 5:25 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 124

PostPosted: Tue Oct 10, 2017 5:45 pm    Post subject: Reply with quote

  • 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:
    • Code:
      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:
      Code:
      sudo gpasswd -a michael plugdev
      Adding user michael to group plugdev

    • Created a new directory called AndroidDevice in my home:
      Code:
       mkdir ~/AndroidDevice

    • When I run mtpfs ~/AndroidDevice it says the folliowing
      Code:
      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:
      Code:
      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:
      Code:
      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.
      Code:
      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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 6:06 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 21757
Location: here

PostPosted: Tue Oct 10, 2017 6:14 pm    Post subject: Reply with quote

Thunar use gnome-base/gvfs package, mtp use flag is enabled on it?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
alogim
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2015
Posts: 124

PostPosted: Tue Oct 10, 2017 6:19 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Tue Oct 10, 2017 7:04 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum