Linux或者Mac下adb串連失敗如何解決

來源:互聯網
上載者:User

不管是在Windows系統還是在Linux系統中,相信不少使用者或開發人員都遇到過手機adb串連不上的情況。其實出現這種問題很多時候是由於adb衝突導致的,畢竟很多軟體都有自己的adb連結。那麼,出現這種問題該怎麼辦呢?下面就給大家介紹下Mac或者linux下adb串連失敗的解決辦法。

1.查看裝置VenderID

在mac下 或者Linux開啟終端(Terminal),linux下可以按快速鍵(CTRL+T,忘了具體是不是大家去試試或者查查),mac下Control+space,輸入Terminal開啟。開啟終端後,輸入命令

mac下:

system_profiler SPUSBDataType

linux下:

lsusb

結果如下:

USB:

USB 3.0 Bus:

Host Controller Driver: AppleUSBXHCILPTH

PCI Device ID: 0x8c31

PCI Revision ID: 0x0005

PCI Vendor ID: 0x8086

Apple Internal Keyboard / Trackpad:

Product ID: 0x0262

Vendor ID: 0x05ac (Apple Inc.)

Version: 2.25

Speed: Up to 12 Mb/sec

Manufacturer: Apple Inc.

Location ID: 0x14400000 / 4

Current Available (mA): 1000

Current Required (mA): 40

Extra Operating Current (mA): 0

Built-In: Yes

BRCM20702 Hub:

Product ID: 0x4500

Vendor ID: 0x0a5c (Broadcom Corp.)

Version: 1.00

Speed: Up to 12 Mb/sec

Manufacturer: Apple Inc.

Location ID: 0x14300000 / 3

Current Available (mA): 1000

Current Required (mA): 94

Extra Operating Current (mA): 0

Built-In: Yes

Bluetooth USB Host Controller:

Product ID: 0x8289

Vendor ID: 0x05ac (Apple Inc.)

Version: 1.18

Speed: Up to 12 Mb/sec

Manufacturer: Apple Inc.

Location ID: 0x14330000 / 7

Current Available (mA): 1000

Current Required (mA): 0

Extra Operating Current (mA): 0

Built-In: Yes

USB Mouse:

Product ID: 0x00fb

Vendor ID: 0x0e8f

Version: 0.01

Speed: Up to 1.5 Mb/sec

Manufacturer: YSTEK

Location ID: 0x14200000 / 2

Current Available (mA): 1000

Current Required (mA): 100

Extra Operating Current (mA): 0

MX4 Pro:

Product ID: 0x0c02

Vendor ID: 0x2a45

Version: ff.ff

Serial Number: 0123456789ABCDEF

Speed: Up to 480 Mb/sec

Manufacturer: Meizu

Location ID: 0x14100000 / 29

Current Available (mA): 1000

Current Required (mA): 500

Extra Operating Current (mA): 0

我的是MX4 Pro,所以Vendor ID: 0x2a45

2.添加VendorID

進入/Users/user/.android,.android為隱藏檔案夾,可以通過終端進入直接:

cd /Users/user/.android

ls

應該有個adb_usb.ini檔案,在windows使用者目錄下也有該檔案。添加上上面的Vendor ID

# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.

# USE ‘android update adb’ TO GENERATE.

# 1 USB VENDOR ID PER LINE.

0x2a45

3.重啟adb命令

在終端下一次輸入:

adb kill-server

adb start-server

 

聯繫我們

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