Ubuntu 安裝MTP驅動訪問安卓裝置

來源:互聯網
上載者:User

由於工作原因….我手中沒有直接能用到Windows 系統,前幾天連最後一台windows 台式機也進化成CentOS了…導致安卓裝置的資料線串連電腦只能充電不能訪問行動裝置的儲存…..

1、安裝MTP工具集: Python 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

1 2 3 4 5 6 7 8 9 10 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 Python 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

1 2 3 4 5 6 7 8 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 Python #如前面通過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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #如前面通過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   #卸載裝置#
相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.