終端不識別手機裝置解決方案

來源:互聯網
上載者:User

標籤:裝置   start   方式   ems   device   boa   rod   sudo   and   

 

1. 先看裝置id,使 用 "lsusb" 命令。
 
    比如裝置顯示的是: Bus 001 Device 123: ID 0e8d:200c MediaTek Inc.
    那麼其id就是: 0e8d
    使用的時候要寫: "0x0e8d".


2. 查到了裝置id,將其添加 到 "~/.android/adb_usb.ini" 用如下命令:
  $ sudo echo "0x0e8d" >> ~/.android/adb_usb.ini  #添加裝置id到adb設定檔中
  $ adb kill-server                             # 關閉adb服務
  $ adb start-server                            #重啟adb服務
  $ adb devices                               #顯示adb裝置


    還可以在終端根目錄輸入"cd ~/.android",即可進入.android檔案夾, 通過"sudo gedit adb_usb.ini"就可以對檔案進行操作.



3. 如果不是當前平台的手機了,換了一個平台,需要另做一步:

        在 "/etc/udev/rules.d/51-android.rules" 中第一行下邊加入如下內容:

   SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0600", OWNER="xxx"

        只需要將"ATTR{idVendor}"對應的值變為新手機的id,其他不用改變即可.

 

4. 如果每次串連手機都需要在手機上選擇相機之類的串連方式

可以進入 /etc/udev/rules.d/51-android.rules

 然後添加如下內容: # 49-micropython.rules # f055:9800 - MicroPython boardATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000",ENV{ID_MM_DEVICE_IGNORE}="1"ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2001",ENV{ID_MM_DEVICE_IGNORE}="1"ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2003",ENV{ID_MM_DEVICE_IGNORE}="1"ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000", ENV{MTP_NO_PROBE}="1"ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2001", ENV{MTP_NO_PROBE}="1"ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2003", ENV{MTP_NO_PROBE}="1"SUBSYSTEMS=="usb", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000",MODE:="0666"KERNEL=="ttyACM*", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2000",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2001",MODE:="0666"KERNEL=="ttyACM*", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2001",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2003",MODE:="0666"KERNEL=="ttyACM*", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="2003",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="1d30", ATTRS{idProduct}=="0201",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="2606",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="107f",MODE:="0666"SUBSYSTEMS=="usb", ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee7",MODE:="0666" #70-ttyUSB.rulesKERNEL=="ttyUSB*", OWNER="root", GROUP="root", MODE="0666"KERNEL=="ttyACM*", OWNER="root", GROUP="root", MODE="0666"

終端不識別手機裝置解決方案

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.