一直在用UBUNTU 10.04 LTS,感觉挺好的不想升级,没想到不支持手机MTP,网上搜索资料也很难找到这么老的系统。
一般都是基于12.04版本如何支持的,更有很多人说10.04版本无法做到支持MTP。
不过经过我的尝试,最终找到了解决办法!
1.安装依赖库:
sudo apt-get install mtpfs mtp-tools
sudo apt-get install libusb-1.0-0-dev libusb-dev
sudo apt-get install libfuse-dev2.创建mount目录:
sudo mkdir /media/mtp
sudo chmod 775 /media/mtp
sudo mtpfs -o allow_other /media/mtp3.插上手机,选择MTP,执行lsusb记下PID和VID,后面要用到。
lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 028: ID 2a45:2008 //HTC手机的VID/PID
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub执行mtp-detect可以看到如下信息,也能看到HTC手机的VID/PID:
mtp-detect
libmtp version: 1.0.2Listing raw device(s)
Device 0 (VID=2a45 and PID=2008) is UNKNOWN.
Please report this VID/PID and the device model to the libmtp development team
Found 1 device(s):
2a45:2008 @ bus 1, dev 28
Attempting to connect device(s)gksu gedit /etc/udev/rules.d/51-android.rules加入如下信息:
SUBSYSTEM=="usb", ATTR{idVendor}=="你的VID", ATTR{idProduct}=="你的PID", MODE="0666"重启UDEV
sudo service udev restart参考资料:
http://www.mysolutions.it/mounting-your-mtp-androids-sd-card-on-ubuntu/