Ubuntu系統下adb devices 不能顯示手機裝置

來源:互聯網
上載者:User

標籤:注意   adb   ini   roi   cti   roo   attrs   comm   class   

1. 查看usb裝置,命令:lsusb
結果如下:
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching HubBus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hubBus 001 Device 005: ID 0cf3:3005 Atheros Communications, Inc. AR3011BluetoothBus 001 Device 004: ID 1bcf:2883 Sunplus Innovation Technology Inc.Bus 002 Device 003: ID 17ef:6019 LenovoBus 002 Device 007: ID 2717:9039最後一個 2717:9309就是小米2,2717是vendorId, 9309是productId(註:如果不確定自己手機是哪個裝置,可以拔出USB線再次輸入lsusb命令,進行對比確認哪個Devices是自己的手機)2. 在 /etc/udev/rules.d/下面建立70-Android.rules檔案, 命令 sudo gedit /etc/udev/rules.d/70-android.rules在檔案中添加:SUBSYSTEM=="usb", ATTR{idVendor}=="2717",ATTRS{idProduct}=="9309",MODE="0666"
(注意,這個70-android.rules 檔案名稱字可以隨意命名,比如 51-android.rules,52-android.rules 是都可以的。要注意標點都是英文下的)3. 給70-android.rules加許可權,命令:sudo chmod a+rx /etc/udev/rules.d/70-android.rules4. 重啟 udev服務,命令: sudo service udev restart5. sudo adb kill-server, 然後 sudo adb devices,如果仍然沒有顯示裝置則進行第6步。6.命令: echo "0x2717" > ~/.android/adb_usb.ini
7.手機斷開,重新串連8.sudo adb kill-server, 然後 sudo adb devices(一般都能成功,如果下次再次串連又串連不上時,只需sudo adb kill-server,然後 sudo adb devices即可顯示裝置)

Ubuntu系統下adb devices 不能顯示手機裝置

聯繫我們

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