Menu

#930 MPT/Android automount not working V1.2.3

1.2
closed-invalid
5
2015-06-25
2015-01-31
No

PCManFM 1.2.3
using LibFM ver. 1.2.3

[dylan@zenbook ~]$ uname -a
Linux zenbook 3.16.1-1-iwlwifidebug #1 SMP PREEMPT Sun Sep 7 23:28:12 PDT 2014 x86_64 GNU/Linux

Hello-
I'm attempting to get my android device to automount using MTP on pcmanfm
Everything I find on the internet indicates that this should 'just work', as far as I can tell.

I believe all appropriate libraries are installed.
I can use mtp-connect to view the device

[dylan@zenbook mounts]$ mtp-connect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.
libmtp version: 1.1.8

Device 0 (VID=22b8 and PID=2e76) is a Motorola Moto G (ID1).
Android device detected, assigning default bug flags
Usage: connect <command1> <command2>
Commands: --delete [filename]
--sendfile [source] [destination]
--sendtrack [source] [destination]
--getfile [source] [destination]
--newfolder [foldername]

and other mtp tools seem to work.

I see when mounting usb drives and such that udisks provides the auto-mounting, but my understanding is that udisks does provide the mtp automounting

This is the journalctl event from a phone insertion. Am I missing something?

Jan 31 13:55:15 zenbook sudo[17247]: pam_unix(sudo:session): session opened for user root by dylan(uid=0)
Jan 31 13:55:18 zenbook kernel: usb 3-2: new high-speed USB device number 55 using xhci_hcd
Jan 31 13:55:18 zenbook laptop-mode[17303]: Laptop mode
Jan 31 13:55:18 zenbook laptop-mode[17304]: enabled, active
Jan 31 13:55:18 zenbook laptop-mode[17398]: Laptop mode
Jan 31 13:55:18 zenbook laptop-mode[17399]: enabled, active
Jan 31 13:55:18 zenbook laptop-mode[17425]: Laptop mode
Jan 31 13:55:18 zenbook laptop-mode[17426]: enabled, active

many thanks!
Camden

Discussion

  • Lonely Stranger

    Lonely Stranger - 2015-05-07
    • status: open --> pending
    • assigned_to: Lonely Stranger
     
  • Lonely Stranger

    Lonely Stranger - 2015-05-07

    The pcmanfm has no own detection means and completely relies on glib/gvfs. Automounting is done when glib/gvfs detects new drive added to the system. It might be gvfs is up but mtp backend is not and therefore gvfs does not see your drive. Check it, please, I think installing appropriate backend will fix your issue. Thank you.

     
  • Camden Lindsay

    Camden Lindsay - 2015-05-08

    Thank you, Lonely Stranger.
    I will have to do more research to understand the 'mtp backend' bit here. I don't see any daemons/services listed on the Arch wiki page of mtp, for any of the solutions

    I have mtplib installed- but don't see any daemon associated.

     
  • Lonely Stranger

    Lonely Stranger - 2015-05-29

    The backend is not related to mtplib but is a GVFS-related thing, the most probably it is https://www.archlinux.org/packages/extra/i686/gvfs-mtp/ one. :)

     
  • Camden Lindsay

    Camden Lindsay - 2015-06-13

    Thank you for this info. I have gvfs-mtp installed, and it doesn't appear to provide any service either.

    At least not a systemd service.
    I guess i have some learning to do yet :(

     
  • Lonely Stranger

    Lonely Stranger - 2015-06-13

    It doesn't provide systemd service, of course, it provides backend for gvfs, so if gvfs is properly installed then it should provide info about connected MTP device.

     
  • Camden Lindsay

    Camden Lindsay - 2015-06-25

    Hm - I think i have everything correct installed

    [dylan@zenbook ~]$ sudo pacman -Qs gvfs
    [sudo] password for dylan:
    local/gvfs 1.24.1-2
    Userspace virtual filesystem implemented as a pluggable module for gio
    local/gvfs-afp 1.24.1-2
    Apple Filing Protocol (AFP) backend for gvfs
    local/gvfs-gphoto2 1.24.1-2
    gphoto2 (PTP camera/MTP media player) backend for gvfs
    local/gvfs-mtp 1.24.1-2
    MTP backend for gvfs
    local/gvfs-smb 1.24.1-2
    SMB/CIFS (Windows client) backend for gvfs
    [dylan@zenbook ~]$

    [dylan@zenbook ~]$ sudo pacman -Qs udisk
    local/udiskie 1.2.0-1
    Removable disk automounter using udisks
    local/udisks 1.0.5-2
    Disk Management Service
    local/udisks2 2.1.5-2
    Disk Management Service, version 2
    [dylan@zenbook ~]$

    Unless i'm missing something about configuration- I really don't see much anything about configuration on the arch

    When I plug in the phone I see this:
    un 24 22:04:26 zenbook sudo[26536]: pam_unix(sudo:session): session closed for user root
    Jun 24 22:04:27 zenbook sudo[26647]: dylan : TTY=pts/0 ; PWD=/home/dylan ; USER=root ; COMMAND=/usr/bin/journalctl -f
    Jun 24 22:04:27 zenbook sudo[26647]: pam_unix(sudo:session): session opened for user root by dylan(uid=0)
    Jun 24 22:04:31 zenbook kernel: usb 2-2: new high-speed USB device number 12 using xhci_hcd
    Jun 24 22:04:31 zenbook laptop-mode[26698]: Laptop mode
    Jun 24 22:04:31 zenbook laptop-mode[26699]: enabled, not active
    Jun 24 22:04:31 zenbook laptop-mode[26750]: Laptop mode
    Jun 24 22:04:31 zenbook laptop-mode[26751]: enabled, not active

    and on the phone it says
    'connected as a media device -- touch for other usb options'

    When i touch that, it has

    'Media Device (MTP)' checkmarked

    there are no udisks-daemon or udisksd entries when it gets plugged in.

    Ah, I found on the arch MTP page
    'If you have installed the gvfs-mtp package, and your device doesn't show up in the file manager, you might need to reboot or write a udev rule in order to auto-mount the device.' (goes on to say to reload the rules and reboot)

    https://wiki.archlinux.org/index.php/MTP#gvfs-mtp

    I've now down that, and rebooted, and still no love.

    Jun 24 22:19:14 zenbook kernel: usb 1-2: new high-speed USB device number 3 using xhci_hcd
    Jun 24 22:19:14 zenbook laptop-mode[2981]: Laptop mode
    Jun 24 22:19:14 zenbook laptop-mode[2982]: enabled, not active
    Jun 24 22:19:14 zenbook laptop-mode[3033]: Laptop mode
    Jun 24 22:19:14 zenbook laptop-mode[3034]: enabled, not active

    [dylan@zenbook ~]$ lsusb | grep -i motor
    Bus 001 Device 003: ID 22b8:2e82 Motorola PCS

    [dylan@zenbook ~]$ sudo tail -1 /etc/udev/rules.d/51-android-rules
    ATTR{idVendor}=="22b8", ATTR{idProduct}=="2e82", SYMLINK+="libmtp", MODE="660", ENV{ID_MTP_DEVICE}="1"

    I suppose this probably isn't a pcmanfm bug, but some supporting service bug. I just don't know where to troubleshoot.

     
  • Lonely Stranger

    Lonely Stranger - 2015-06-25

    Well, on Ubuntu all MTP devices are recognized by gfvs and there are no udev rules for them at all, at least I've checked that a moment ago, got next lines in log:

    [ 1372.628092] usb 1-2: new high-speed USB device number 5 using ehci-pci
    [ 1372.760998] usb 1-2: New USB device found, idVendor=0bb4, idProduct=0c02
    [ 1372.761012] usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
    [ 1372.761022] usb 1-2: Product: MT65xx Android Phone
    [ 1372.761031] usb 1-2: Manufacturer: MediaTek
    [ 1372.761039] usb 1-2: SerialNumber: 0123456789ABCDEF
    

    that's all I've got, and as you can see, udev didn't recognized its type since there are no mentions for 0bb4:0c02 combination on that system. Although gvfs detected it as MTP and it showed up in the file manager right away allowing me browse files via URI mtp://[0bb4:0c02]/. It is Ubuntu 14.04 LTS without any intrusions into udev rules. I have no big knowledge how it works, I'm sorry.

    UPD: on the Ubuntu system there is a process running by logged in user:

    /usr/lib/gvfs/gvfs-mtp-volume-monitor
    

    It started by gvfsd on session start and it should be one which does all that work, and if it isn't ran by your session then it may be a culprit of your problems, poke your distro maintainers to fix that.

     

    Last edit: Lonely Stranger 2015-06-25
  • Lonely Stranger

    Lonely Stranger - 2015-06-25
    • labels: --> isn't related to libfm or pcmanfm
    • status: pending --> closed-invalid
     

Anonymous
Anonymous

Add attachments
Cancel