error: insufficient permissions for device(解決adb shell問題)

來源:互聯網
上載者:User

標籤:

今天在linux下串連平板usb,試用adb shell時出現error: insufficient permissions for device,

而且我們輸入adb devices顯示:

[email protected]:~$ adb devices
List of devices attached
????????????    device
那麼我們怎麼解決它呢?


首先在終端查看usb的ID,輸入lsusb命令,我們可以看到我們剛插如usb的ID號,如:

[email protected]:~$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 003: ID 0461:4d80 Primax Electronics, Ltd
Bus 001 Device 004: ID 1c7a:0801 LighTuning Technology Inc. Fingerprint Reader
Bus 002 Device 003: ID 5986:0190 Acer, Inc
Bus 001 Device 019: ID 0bb4:0c02 High Tech Computer Corp. Dream / ADP1 / G1 / Magic / Tattoo (Debug)

紅色的就是我們插入usb的ID號。


那麼我們進入到cd /etc/udev/rules.d/下,建立一個51-android.rules檔案(sudo  vim  51-android.rules),在這個檔案中寫上:

SUBSYSTEM=="usb", ATTRS{idVendor}==" 0bb4", ATTRS{idProduct}=="0c02",MODE="0666"

儲存,再為51-android.rules加上許可權(sudo chmod a+x 51-android.rules).


拔掉usb重新插上就可以了,如:

[email protected]:~$ adb devices
List of devices attached
AB100607    device

這樣就解決了不能識別USB的問題。

error: insufficient permissions for device(解決adb shell問題)

相關文章

聯繫我們

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