Any idea why adb does not recognize my nexus 4 on mac

梦想与她 提交于 2019-12-07 03:34:03

问题


I can't figure out why my nexus 4 is absent from the list of adb devices. I've tried the following

  • $ adb kill-server; adb devices
  • $ echo 0x18d1 >> ~/.android/adb_usb.ini $ adb kill-server; adb devices
  • Changed usb computer connection type to PTP instead of MTP
  • Restarted the phone etc

Adb is on my path. Nexus 4 shows up when I view System Information.

I've tried asking on xda devs but no luck. Any suggestions on what I can try?

Thanks in advance


回答1:


Very weird, I switched to a cheap chinese made cable and now adb sees my device.




回答2:


I was only getting a blank result when I run: ./adb devices nothing would show up.

Here's the fix:

  1. SDK (Latest Version)
  2. Put developer mode on nexus 4 ( About Phone > Build Number > tap 7 times to enter Dev Mode)
  3. A new menu will pop up {} Developer Options -
  4. Make sure you check under Developer options:
    • USB Debugging : Debug mode when USB is connected
    • Verify apps over USB : Check apps installed via ADB/ADT for Harmful behavior

This worked for me, no try: ./adb devices Then my serial number of my Nexus 4 was displayed.

Good luck.




回答3:


You have to first enable "Developer" mode on the device before trying "adb devices" option. Here is the topic that explains how.

How to find and turn on USB debugging mode on Nexus 4.

This worked for me.




回答4:


When you connect your device with the developer option enabled, and the USB debugging enabled, it should prompt you about remote debugging. If that prompt doesn't happen, it means the device is not seen by the Mac or ADB.

In my experience on MacOS X, you have to try different USB ports and sometimes disconnect all other USB devices (including the keyboard...).

Once the device finally pops up in your terminal, you can reconnect the devices if required.




回答5:


Its because that you didnt update your SDK

you need to update you SDK to the latest one

i.e API level 17

your Nexes 4 OS version is 4.2 so you need to update your android sdk to API leve 17 4.2 to detect it.



来源:https://stackoverflow.com/questions/17398039/any-idea-why-adb-does-not-recognize-my-nexus-4-on-mac

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!