码迷,mamicode.com
首页 > 移动开发 > 详细

Ubuntu 安装MTP驱动访问安卓设备(转载)

时间:2015-01-30 14:49:25      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:

    转自:http://www.ipython.me/ubuntu/how-to-connect-kindle-with-ubuntu.html

 

1、安装MTP工具集:

mr_liu@i-it:~$ sudo apt-get install mtp-tools mtpfs
 
mr_liu@i-it:~$ dpkg -l mtp-tools mtpfs
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                           Version                        Description
+++-==============================-==============================-============================================================================
ii  mtp-tools                      1.1.3-1ubuntu0.1               Media Transfer Protocol (MTP) library tools
ii  mtpfs                          0.9-3build1                    FUSE filesystem for Media Transfer Protocol devices

2、检测设备的 idVendor 和 idProduct

mr_liu@i-it:~$ mtp-detect | grep idVendor
Device 0 (VID=1949 and PID=000d) is UNKNOWN.
 
mr_liu@i-it:~$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 002: ID 045e:07b2 Microsoft Corp.
Bus 003 Device 003: ID 1949:000d Lab126

3、在linux 里面不需要为Pad或安卓手机安装设备驱动,但需要添加访问规则,如下,编辑/etc/udev/rules.d/51-android.rules

#如前面通过lsusb和mtp-detect获取到到设备ID号 对应到变更到下面的配置中#
mr_liu@i-it:~$ sudo cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="1949", ATTR{idProduct}=="000d", MODE="0666"
 
#创建一个目录作为我设备的挂载点#
mr_liu@i-it:~$ mkdir my-kindle
 
#挂载设备#
mr_liu@i-it:~$ sudo mtpfs -o allow_other my-kindle/
mr_liu@i-it:~$ ls my-kindle/
Alarms   Baidu_music     Documents      kindle         Pictures   Ringtones
Android  Books           Download       Movies         Playlists  sogou
Audible  cleanmaster_cn  FileRecv_QQHD  Music          Podcasts   Tencent
baidu    DCIM            gameloft       Notifications  Qzone
 
#卸载设备#
umount ~/my-kindle

 

Ubuntu 安装MTP驱动访问安卓设备(转载)

标签:

原文地址:http://www.cnblogs.com/lance-ehf/p/4261655.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!