Mac eclipse 连接 手机调试

很多Android程序员 用Mac 来开发。但是Mac下eclipse连接 手机存在一些问题。下面就个人经验分享一下。

1.确保手机开启了usb调试模式 并且连上了电脑

2.设置好你的机器环境配置变量

3.在mac终端输入

system_profiler SPUSBDataType会显示一些数据 (如:我的是一加android手机)

  Product ID: 0x9011

          Vendor ID: 0x2a70

          Version: 2.32

          Serial Number: b965c8b0

          Speed: Up to 480 Mb/sec

          Manufacturer: Android

          Location ID: 0x14100000 / 6

          Current Available (mA): 500

          Current Required (mA): 500

          Capacity: 22.1 MB (22,144,080 bytes)

          Removable Media: Yes

          Detachable Drive: Yes

          BSD Name: disk2

          Partition Map Type: Unknown

          S.M.A.R.T. status: Not Supported

          Volumes:

            OnePlus Drivers:

              Capacity: 19.3 MB (19,281,920 bytes)

              Available: Zero KB

              Writable: No

              File System: ISO Rockridge

              BSD Name: disk2s0

              Mount Point: /Volumes/OnePlus Drivers

              Content: CD_ROM_Mode_1


这个Vendor ID: 0x2a70 非常重要 copy你的0x2a70

终端输入命令 echo0x2a70 >> ~/.android/adb_usb.ini 将设备的厂家ID输入到 adb_usb的初始配置文件中。

重新启动 一下 adb.命令是先关闭 adb kill-server;再打开adb start-server.

Last login: Sat Dec 19 18:44:31 on console

localhost:~ liulongling$ adb kill-server

localhost:~ liulongling$ adb start-server

* daemon not running. starting it now on port 5037 *

* daemon started successfully *

localhost:~ liulongling$ adb devices

List of devices attached 

b965c8b0unauthorized







你可能感兴趣的:(Mac eclipse 连接 手机调试)