adb doesn't show nexus 5 device

2019-01-16 07:34发布

Android Studio 0.3.6
Fedora 18 3.11.7-100.fc18.x86_64
Nexus 5 Kitkat

Hello,

I have been using my Samsung Galaxy Tab 3 7.0 running Android 4.1.2 everything works fine with adb.

However, I have just bought a new Nexus 5 device, and when I do the following command adb devices it doesn't show my Nexus 5.

Under Android SDK Manager | Extras | Google USB Driver | status "Not compatiable with Linux"

Because I am running Fedora 18 if I need drivers what drivers for the USB do I need?

Because the Samsung works fine and I can deploy and run my apps, I think my setup is correct. So I am wondering if there is something wrong with my Nexus 5.

I have tried the following:

adb kill-server
adb start-server

Setting the Nexus 5 Camera PTP and media device MTP didn't work.

Many thanks for any suggestions,

21条回答
\"骚年 ilove
2楼-- · 2019-01-16 08:13

My windows solution:

Go here and download and unzip to an easy location:

http://developer.android.com/sdk/win-usb.html#top

  • Right click 'My Computer' or 'Computer'

  • Select properties

  • Select Device manager

  • Look for your device. It should have a yellow mark above it.

  • Click 'update driver software'.

  • select browse my computer for driver software.

  • select the usb_driver folder you saved earlier.

  • install it

and wala. magic.

查看更多
我只想做你的唯一
3楼-- · 2019-01-16 08:14

ADB and driver versions matter. The newer the device, the lower the chances of an older version ADB to work correctly.

Apps using their own ADB copy need to be updated or at least have their ADB updated manually.

When installing Helium / Carbon for instance, it uses an old / incomplete ADB. Newer devices might not link to the ADB server for this very reason.

What I'm writing here should work for any future devices on Windows and possibly *nix OSes.

First the systems must be prepared. on Android:

  • activate developer mode, either from an app (like Helium, when prompted) or by accessing the about phone section, taping build number until the developer mode unlocks
  • in developer settings enable USB debugging
  • in security settings allow unknown sources
  • (when connected with USB cable) set USB connectivity to PTP mode (camera device, if so labeled)

in Windows:

  • uninstall older USB driver (with file removal) if there is one, but only when the device is connected and in developer mode, otherwise that particular device won't be listed
  • install latest USB driver after the device has been plugged in and developer mode is active, the device will be listed as unknown or other in Device Manager; the drivers can be downloaded separately from Google Android support site, these are the same as vendor drivers, with only fewer ID's in inf file making the driver not being recognized for all Android devices
  • if the driver does not recognise the device, no problem, install it generically: Manual Install > Show All Devices > Have Disk > pick inf location of the Android USB driver and from the list select Android ADB Interface; there's not need to edit the inf by adding hardware ids, the end result is the same
  • each of the modes, PTP and MTP will have their own driver entry, so if the device asks for MTP, the same driver installation procedure must be followed, again

Once these steps are/were previously done correctly, adb must be tested. If Android SDK was installed previously, open a command prompt where adb.exe is and test the listing of the device.

adb start-server IMPORTANT NOTE: This command will prompt the device to allow the communication between the computer it's been linked to on the first run. The prompt will also list an RSA key specific to the PC in question. Without this prompt on start-server, ADB will NOT work! Nor will any application relying on ADB.

adb devices Must list the device(s). If the list is empty, and most likely the RSA prompt did not occur, then no communication will work. If the list is empty the current ADB (and SDK) must be updated or installed fresh (in the case of apps bringing in their own ADB runtime, like Helium / Carbon).

In the case of applications that do bring their own ADB, if the version is old, and these apps insist in using it instead of the SDK one, these files need to be replaced with the latest ones from Android SDK. Plain and simple copy & paste.

As for Android SDK, the only required packages to be installed are SDK Tools and Platform-tools. There, ADB.exe will need some support libraries, on Windows these files are AdbWinApi.dll and AdbWinUsbApi.dll. After all is done, the SDK can be uninstalled from SDK Manager while being able to retain the ADB tool if this is the only runtime used, depending on the case in question.

查看更多
Deceive 欺骗
4楼-- · 2019-01-16 08:17

In my case:

  • The phone was connected as a media device.
  • Clicked on that message and got a menu. "USB computer connection"
  • In that menu chose to connect it as a camera (for devices that do not support MTP)

And then it worked.

查看更多
Lonely孤独者°
5楼-- · 2019-01-16 08:17

Go here and download and unzip to an easy location:

http://developer.android.com/sdk/win-usb.html#top Download and install

查看更多
萌系小妹纸
6楼-- · 2019-01-16 08:17

Answer by Rick and MadX is the right way to do the steps (Thumbs Up for the answer)

In my case I am using Akcess USB Type C Data Sync Cable For Nexus 5x, 5P - White As Nexus 5x do not supply type C to usb cable I purchased it from some vendor.

Having the same issue. What I am doing stupidly is:- I am connecting the cable in wrong way. After I reconnect it from upside down its working for me.

I might think that some of the Cables do not support debuggable. But its in my case.

This(Image) is my case the Type C should be as USB side symbol. A stupid solution, but work for me enter image description here

查看更多
Evening l夕情丶
7楼-- · 2019-01-16 08:17

I had a similar problem with my Nexus 4(Android version 4.4.2), it wasn't listed in adb devices.

Make sure USB debugging is enabled from device, and do the following on your PC:

  1. Update Android SDK (Google USB Driver)

  2. From PC Control Panel, System -> Device manager -> Right click Nexus 4 -> Update driver.

  3. Set android-sdk-folder\extras\google\usb_driver as path to search, include subfolders checked.

If windows tells you that the driver is up to date, just uninstall the driver (right click on nexu4 -> uninstall driver) and start from step 2 again.

After that, open a cmd and type adb kill-server and then a adb devices, now it will include your device.

https://developer.android.com/studio/run/oem-usb.html

查看更多
登录 后发表回答