1 参考ubuntu挂载
在Ubuntu挂载使用MTP设备步骤如下:
1.将MTP设备连接至PC机
2.如果是第一次使用MTP设备需要安装以下软件,否则可以跳过此步骤:
$ sudo apt-get install mtpfs libfuse-dev libmad0-dev
建立挂载点
$ sudo mkdir /media/mtp
修改权限
$ sudo chmod 777 /media/mtp
3.挂载MTP设备
$ sudo mtpfs -o allow_other /media/mtp
如果提示设备忙,可以等一会再挂载。
4.传输文件(这时候以MTP模式进行传输),方法同USB,如:
$ cp video.mp4 /media/mtp/Movies/
5.卸载设备
$ sudo umount /media/mtp
我在Ubuntu 10.10上用Android 3.0做MTP设备是可以成功挂载的,挂载后会出现mtp的盘。
上面参考自:http://www.linuxidc.com/Linux/2012-01/52725.htm
2 fedora实际挂载出现的问题
1 反应迟钝
Device 0 (VID=2717 and PID=f003) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
2717:f003 @ bus 2, dev 7
Attempting to connect device
ignoring libusb_claim_interface() = -6PTP_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
Listing File Information on Device with name: (NULL)
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the 'nonempty' mount option
一开始打不开 ,后来过了一段时间自动打开了。。。。。可能需要等待一段时间
2 断开,重新挂载buxing
Listing File Information on Device with name: (NULL)
fuse: bad mount point `/media/mtp': Transport endpoint is not connected
另外 建立一个挂载点
例如 sudo mtpfs -o allow_other /mnt/xiaomi
3 需要说明的是 很不稳定,过一会就链接不上了,所以传输文件谨慎
4 使用umount命令
如果直接拔掉的话,第一传输文件丢失,第二这个挂载点估计下次不可用
umount /mnt
umount: /mnt: device is busy
umount: /mnt: device is busy
于是想到使用fuser查看是哪个进程占用了/mnt
fuser /mnt
Cannot stat /mnt: Transport endpoint is not connected
Cannot stat /mnt: Transport endpoint is not connected
GOOGLE中。。。
一神贴中提及lsof,抱着试试看的态度来了一下。呀,还真灵。
[root@e /]# lsof |grep /mnt
lsof: WARNING: can't stat() fuseblk file system /mnt
Output information may be incomplete.
su 25762 root cwd unknown /mnt//full_20101115/db/datafile (stat: Transport endpoint is not connected)
bash 25763 root cwd DIR 8,33 4096 5 /mnt2
bash 29572 oraadm cwd unknown /mnt//full_20101115/db/datafile (stat: Transport endpoint is not connected)
果断kill。remount成功。
参考自:http://hi.baidu.com/maydayuiui/item/438d217c5ccd0b346cc37cee