User Tools

Site Tools


linux:mtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
linux:mtp [2012/12/30 21:35] percylinux:mtp [2016/05/05 13:07] (current) – external edit 127.0.0.1
Line 11: Line 11:
 Then use jmtpfs mount the device: Then use jmtpfs mount the device:
    jmtpfs -o allow_other  /media/galaxy_nexus/    jmtpfs -o allow_other  /media/galaxy_nexus/
-  +Note should edit  
 +  vim /etc/fuse.conf  
 +===== Auto mount/umount MTP ===== 
 +<file BASH 99-android-mtp.rules> 
 +#localhost bin # cat /etc/udev/rules.d/99-android-mtp.rules  
 +ATTR{idVendor}=="04e8", ACTION=="add",RUN="/usr/local/bin/mount_galaxy_nexus.sh &"  
 +ATTR{idVendor}=="04e8", ACTION=="remove",RUN="/usr/local/bin/umount_galaxy_nexus.sh &"  
 +</file> 
 + 
 +<file BASH mount_galaxy_nexus.sh> 
 +#localhost bin # cat /usr/local/bin/mount_galaxy_nexus.sh  
 +#!/bin/sh  
 + 
 +echo "Galaxy Nexus connected" 
 +jmtpfs -o allow_other /media/galaxy_nexus 
 +echo "Galaxy Nexus mounted on /media/galaxy_nexus" 
 + 
 +</file BASH umount_galaxy_nexus.sh> 
 +#localhost bin # cat /usr/local/bin/umount_galaxy_nexus.sh  
 +#!/bin/sh  
 + 
 +echo "Galaxy Nexus disconnected" 
 +umount /media/galaxy_nexus 
 +echo "Galaxy Nexus umounted on /media/galaxy_nexus" 
 + 
 +</file>
/var/www/dokuwiki/wiki/data/attic/linux/mtp.1356874557.txt.gz · Last modified: 2016/05/05 13:06 (external edit)