Difference: AVFedotovHowToDom3Fedora18 (56 vs. 57)

Revision 572016-04-19 - AlexanderFedotov

Line: 1 to 1
 
META TOPICPARENT name="AVFedotovHowToDom3"
<!--
   ==================
Line: 7387 to 7387
 
  • An external SD card formatted with exFAT, could be immediatedly mounted / read / written. No reboot was needed.
Added:
>
>

  71. (19.04.16) simple-mtpfs -- a tool to mount an android device connected via USB as a media device using MTP (Media Transfer Protocol)

  • Installed via apper from the Fedora repository.

  • The corresponding line in /var/log/yum.log:
    Apr 19 00:46:05 Installed: simple-mtpfs-0.1-4.fc18.x86_64
    

  • Executable: /usr/bin/simple-mtpfs
  • Man page: man simple-mtpfs (quite many various options described)
  • A short guide: /usr/share/doc/simple-mtpfs-0.1/README

  • From the README:
    • To mount MTP-based device to your local filesystem, simply run:
                 simple-mtpfs < mountpoint >
    • To unmount MTP device, use following:
                 fusermount -u < mountpoint >

  • First trial under fedotov for WTab i10+:
    [dom3] ~ $ mkdir -p android_mnt
    [dom3] ~ $ simple-mtpfs android_mnt
    [dom3] ~ $ ls android_mnt 
    [dom3] ~ $ fusermount -u android_mnt
    fusermount: entry for /opt/home/fedotov/android_mnt not found in /etc/mtab
    
    The same story after the reboot.

  • Now under root:
    [root] ~ $ ls /mnt
    [root] ~ $ simple-mtpfs /mnt
    Device 0 (VID=8087 and PID=0a5e) is UNKNOWN.
    Please report this VID/PID and the device model to the libmtp development team
    Android device detected, assigning default bug flags
    [root] ~ $ ls /mnt
    Internal storage  SD card
    
    Yes! Can read and write from/to both storages ("Internal storage" and "SD card"), but only as root:
    [root] ~ $ ll -a /mnt
    drwxrwxr-x. 2 root root 0 Jan  1  1970 Internal storage
    drwxrwxr-x. 2 root root 0 Jan  1  1970 SD card
    
    For the access by a normal user, we probably need the "-o allow_other" option.
    [root] ~ $ fusermount -u /mnt
    [root] ~ $ ls /mnt
    [root] ~ $ simple-mtpfs -o allow_other /mnt
    Device 0 (VID=8087 and PID=0a5e) is UNKNOWN.
    Please report this VID/PID and the device model to the libmtp development team
    Android device detected, assigning default bug flags
    
    [root] ~ $ ll -a /mnt
    total 0
    drwxrwxr-x. 2 root root 0 Jan  1  1970 Internal storage
    drwxrwxr-x. 2 root root 0 Jan  1  1970 SD card
    
    [root] ~ $ ll -a /mnt/SD\ card/
    total 0
    drwxrwxr-x. 2 root root 0 Jan  1  1970 linuxdir
    drwxrwxr-x. 2 root root 0 Jan  1  1970 LOST.DIR
    drwxrwxr-x. 2 root root 0 Jan  1  1970 t3
    drwxrwxr-x. 2 root root 0 Jan  1  1970 testdir
    drwxrwxr-x. 2 root root 0 Jan  1  1970 testdir2
    drwxrwxr-x. 2 root root 0 Jan  1  1970 windir
    

  • Strange, but under fedotov the ownership is different:
    [dom3] ~ $ ll /mnt/SD\ card 
    total 0
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 linuxdir
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 LOST.DIR
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 t3
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 testdir
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 testdir2
    drwxrwxr-x. 2 fedotov fedotov 0 Jan  1  1970 windir
    
    [dom3] ~ $ cd /mnt/SD\ card/linuxdir 
    [dom3] /mnt/SD card/linuxdir $ ll
    total 1
    -rw-rw-r--. 1 fedotov fedotov 14 Apr 19 01:30 emacs_file
    
  • And yes, user fedotov may read and write.

  72. (19.04.16) /mnt/mtp directory and mtp_mount , mtp_umount scripts in /usr/local/bin to mount / unmount an MTP USB-connected device

  • To simplify the usage of simple-mtpfs installed in the previous sect.70. we have created
    • the directory /mnt/mtp where the MTP devices will be mounted
    • two scrpts in /usr/local/bin
      • mtp_mount -- a mount command containing
                   simple-mtpfs -o allow_other /mnt/mpt
      • mtp_umount -- an unmount command containing
                   fusermount -u /mnt/mpt
  • The commands must be used under root

 

Tips

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback