Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Device not recognized by adb

My Android device isn't recognized by eclipse nor adb anymore. My OS is Windows 7 64-bit, and I'm using a Nexus 4 with Stock Android 4.4.2.

Here are some details on the problem:

  1. Yesterday I could run Android Projects from eclipse on my device with no problems. The only thing that I did on eclipse, which could have caused this problem, was installing the v7 appcompat support library from a resource to eclipse using this guide on developers.android (https://developer.android.com/tools/support-library/setup.html).
  2. The device is still recognized as a normal multimedia drive in Windows when it's not in debug mode.
  3. The device is in Developers mode and in Debug mode when I try to run an Android Project in eclipse or try to see if it's recognized by adb using adb devices in the console.
  4. The Google USB drivers have been installed through the ADK Manager
  5. The USB OEM drivers for Windows have already been installed according to the tutorial on the android-developers site (see: https://developer.android.com/tools/extras/oem-usb.html)
  6. I tried to restart adb by using the commands adb kill-server and adb start-server, and again checked if the devices was recognized by using adb devices. The device was still not listed on the console.
  7. Restarting windows & eclipse did not fix this problem.

Does anyone know a solution for this problem? Thanks in advance!

UPDATE: Thanks for the repies, the problem is solved (for now). I tried the following suggestions in this order:

  1. I restarted my device - this did not fix the problem
  2. I set my device to PTP mode - this fixed the problem.

So I reset my device to MTP mode & debug mode again to check if it still would be recognised by adb for some reason. It definitly doesn't get recognised by adb when it's in MTP-mode. I don't know how it got recognised some days ago, because I never setmy device to PTP-mode. Anyway, the solution to my problem is that my Nexus 4 must be in PTP-Mode and of course in debug-mode to get recognised by adb.

I didn't try any other suggestions since my problem got solved with my current drivers.

like image 415
user3135185 Avatar asked Mar 17 '14 09:03

user3135185


People also ask

Why is ADB not detecting my device?

It might be that the ADB issue is not with your computer but is with your Android device. In most cases, ADB cannot recognize your device because the USB debugging option is turned off on the device. Turning this option on can fix the issue for you and this is pretty easy to do.

Why is ADB not working?

Failed ADB connections usually have one root cause: bad Android USB drivers that load in place of the right ones. Windows doesn't make it easy to remove the wrong drivers, unfortunately. But before attempting to troubleshoot an ADB connection, first enable USB debugging on your phone if it's not on already.


2 Answers

Generally, I think your USB connection should be set to use MTP (Media Transfer), however, I couldn't get my computer to recognize my device (Nexus 4). Oddly, setting the USB connection to Camera got it working for me.

like image 131
ajacian81 Avatar answered Sep 23 '22 18:09

ajacian81


I also faced the same problem and tried almost everything possible from manually installing drivers to editing the winusb.inf file. But nothing worked for me.

Actually, the solution is quite simple. Its always there but we tend to miss it.

Prerequisites

Download the latest Android SDK and the latest drivers from here. Enable USB debugging and open Device Manager and keep it opened.

Steps

1) Connect your device and see if it is detected under "Android Devices" section. If it does, then its OK, otherwise, check the "Other devices" section and install the driver manually.

2) Be sure to check "Android Composite ADB Interface". This is the interface Android needs for ADB to work.

3) Go to "[SDK]/platform-tools", Shift-click there and open Command Prompt and type "adb devices" and see if your device is listed there with an unique ID.

4) If yes, then ADB have been successfully detected at this point. Next, write "adb reboot bootloader" to open the bootloader. At this point check Device Manager under "Android Devices", you will find "Android Bootlaoder Interface". Its not much important to us actually.

5) Next, using the volume down keys, move to "Recovery Mode".

6) THIS IS IMPORTANT - At this point, check the Device Manger under "Android Devices". If you do not see anything under this section or this section at all, then we need to manually install it.

7) Check the "Other devices" section and find your device listed there. Right click -> Update drivers -"Browse my computer..." -> "Let me pick from a list..." and select "ADB Composite Interface".

8) Now you can see your device listed under "Android Devices" even inside the Recovery.

9) Write "adb devices" at this point and you will see your device listed with the same ID.

10) Now, just write "adb sideload [update].zip" and your are done.

Hope this helps.

like image 25
Aritra Roy Avatar answered Sep 21 '22 18:09

Aritra Roy