Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: How to traverse MTP mounted devices (phones) from the terminal?

  1. #1

    Question How to traverse MTP mounted devices (phones) from the terminal?

    Not sure if this is the best place for this post but could not think of a better place to as it.

    I want to offload tons of files from my Google Pixel 2 using Rsync or CP to preserve the file attributes like the timestamps, etc.

    The problem is that I cannot seem to find the exact mount point used to mount the MTP to begin with and the more I search online the more baffled I become.

    from what I gather online the mount points should be either in /run/user/$USER/gvfs or in /var/run/user/$UID/gvfs while the MTP devices are connected. However, both directories are empty and lead to nothing even when the phone is connected.

    I am at the end of my whits trying to figure out a way to be able to access the files on the phone which are shared on the MTP through the terminal, any help would be very much appreciated.

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,871

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    You seem to be sure that the phone is mounted. Then a simple
    Code:
    mount
    will show you all mounted file systems. You only have to identify your phone in that list. It will be somewhere at the end.
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,193
    Blog Entries
    1

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    Further to Henk's advice do you have the mtpfs (or similar) FUSE file system installed?
    Code:
    zypper se -s mtpfs
    Also, is MTP specifically enabled in your Google device?

    https://wiki.archlinux.org/index.php...nsfer_Protocol
    openSUSE Leap 15.0; KDE Plasma 5

  4. #4

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    Quote Originally Posted by hcvv View Post
    You seem to be sure that the phone is mounted. Then a simple
    Code:
    mount
    will show you all mounted file systems. You only have to identify your phone in that list. It will be somewhere at the end.
    Thanks for the reply,

    Did check the output but my phone is nowhere on that list

    Code:
    taker@xps13:~> mount
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    devtmpfs on /dev type devtmpfs (rw,nosuid,size=8041932k,nr_inodes=2010483,mode=755)
    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
    tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
    cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
    cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
    efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
    bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
    cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
    cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
    cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
    cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
    cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
    cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
    cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
    cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
    cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
    /dev/mapper/system-root on / type btrfs (rw,relatime,ssd,space_cache,subvolid=747,subvol=/@/.snapshots/393/snapshot)
    mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=20857)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
    debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
    /dev/mapper/system-root on /usr/local type btrfs (rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/usr/local)
    /dev/mapper/system-root on /.snapshots type btrfs (rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots)
    /dev/mapper/system-root on /var type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/var)
    /dev/mapper/system-root on /opt type btrfs (rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/opt)
    /dev/mapper/system-root on /tmp type btrfs (rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/tmp)
    /dev/mapper/system-root on /root type btrfs (rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/root)
    /dev/mapper/system-root on /boot/grub2/i386-pc type btrfs (rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc)
    /dev/mapper/system-root on /srv type btrfs (rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/srv)
    /dev/mapper/system-root on /boot/grub2/x86_64-efi type btrfs (rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi)
    /dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
    /dev/mapper/system-home on /home type xfs (rw,relatime,attr2,inode64,noquota)
    /var/lib/snapd/snaps/core_5714.snap on /snap/core/5714 type squashfs (ro,nodev,relatime,x-gdu.hide)
    /var/lib/snapd/snaps/core_5548.snap on /snap/core/5548 type squashfs (ro,nodev,relatime,x-gdu.hide)
    fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
    vmware-vmblock on /run/vmblock-fuse type fuse.vmware-vmblock (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
    tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1610632k,mode=700,uid=1000,gid=100)
    pcloud on /tmp/.mount_pcloudq1wtFf type fuse.pcloud (ro,nosuid,nodev,relatime,user_id=1000,group_id=100)
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    pCloud.fs on /home/taker/pCloudDrive type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    Quote Originally Posted by deano_ferrari View Post
    Further to Henk's advice do you have the mtpfs (or similar) FUSE file system installed?
    Code:
    zypper se -s mtpfs
    Also, is MTP specifically enabled in your Google device?

    https://wiki.archlinux.org/index.php...nsfer_Protocol
    Yes I have simple-mtpfs installed and MTP is officially enabled in my Google Pixel device along with USB debugging. I followed the first half of this video to mount my phone to a directory in my home directory but I recive an error depite the simple-mtpfs seeing my phone.

    Code:
    taker@xps13:~> simple-mtpfs -l
    1: Google IncNexus/Pixel (MTP+ADB)
    taker@xps13:~/Temp> simple-mtpfs --device 1 ~/Temp/cell/
    LIBMTP PANIC: Trying to dump the error stack of a NULL device!
    I have no idea how to bypass the LIBMTP PANIC error. I tried looking online for a solution as well but there doesn't seem to be much available on that PANIC error out there.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,193
    Blog Entries
    1

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    [QUOTE=TakerTX;2911019]
    Code:
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    pCloud.fs on /home/taker/pCloudDrive type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    Just speculating here....not a conflict with between gvfsd-fuse and simple-mtpfs trying to concurrently access the device perhaps?

    One of many results I found online...
    https://lists.opensuse.org/opensuse/.../msg00154.html


    Yes I have simple-mtpfs installed and MTP is officially enabled in my Google Pixel device along with USB debugging. I followed the first half of this video to mount my phone to a directory in my home directory but I recive an error depite the simple-mtpfs seeing my phone.

    Code:
    taker@xps13:~> simple-mtpfs -l
    1: Google IncNexus/Pixel (MTP+ADB)
    taker@xps13:~/Temp> simple-mtpfs --device 1 ~/Temp/cell/
    LIBMTP PANIC: Trying to dump the error stack of a NULL device!
    I have no idea how to bypass the LIBMTP PANIC error. I tried looking online for a solution as well but there doesn't seem to be much available on that PANIC error out there.
    Actually, I get numerous results googling "LIBMTP PANIC: Trying to dump the error stack of a NULL device!"
    Last edited by deano_ferrari; 11-Aug-2019 at 00:45.
    openSUSE Leap 15.0; KDE Plasma 5

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,193
    Blog Entries
    1

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    I also wanted to share this redhat bug report just in case it is relevant with respect to the fuse kernel module perhaps.
    openSUSE Leap 15.0; KDE Plasma 5

  7. #7

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    [QUOTE=deano_ferrari;2911020]
    Quote Originally Posted by TakerTX View Post
    Code:
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    pCloud.fs on /home/taker/pCloudDrive type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    Just speculating here....not a conflict with between gvfsd-fuse and simple-mtpfs trying to concurrently access the device perhaps?

    One of many results I found online...
    https://lists.opensuse.org/opensuse/.../msg00154.html



    Actually, I get numerous results googling "LIBMTP PANIC: Trying to dump the error stack of a NULL device!"
    I found and followed the suggestion in the link you provided when I did my search eaerlier but that did not help. I cannot seem to be able to remove gvfsd-fuse and killing all of its processes using the commands provided in the link does not help either the first two killall commands cannot find any processes, only the last one finds one or two that it successfully kills but I still keep receiving the same error when trying simple-mtpfs command. Other links I found online were pretty much in the same category as well.

  8. #8

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    [QUOTE=deano_ferrari;2911020]
    Quote Originally Posted by TakerTX View Post
    Code:
    gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    pCloud.fs on /home/taker/pCloudDrive type fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=100)
    Just speculating here....not a conflict with between gvfsd-fuse and simple-mtpfs trying to concurrently access the device perhaps?

    One of many results I found online...
    https://lists.opensuse.org/opensuse/.../msg00154.html



    Actually, I get numerous results googling "LIBMTP PANIC: Trying to dump the error stack of a NULL device!"
    I should also add that the process that killall -v mtp.so finds and kills keeps being relaunched somehow despite being killed so running the command again and again finds the same process and kills it 6 times out of 10. But the same error occurs when I try running the simple-mtpfs command even when no more processes were found.

    The process is as follows:

    Code:
    killall -v mtp.so
    Killed mtp.so(19336) with signal 15
    Last edited by TakerTX; 11-Aug-2019 at 01:17. Reason: typo

  9. #9
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,193
    Blog Entries
    1

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    Hmmm.... which desktop environment is in use here? Is the nautilus file manager in use?
    openSUSE Leap 15.0; KDE Plasma 5

  10. #10

    Default Re: How to traverse MTP mounted devices (phones) from the terminal?

    Quote Originally Posted by deano_ferrari View Post
    Hmmm.... which desktop environment is in use here? Is the nautilus file manager in use?
    Not sure if it is nautilus or not but I am running the default installation of OpenSUSE Tumbleweed with KDE Plasma 5

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •