247

I have a HP Slate 21 that is connected to my Windows box using a USB cable.

USB debugging is enabled on the device.

After adding the proper %SingleAdbInterface% and %CompositeAdbInterface% entries to the android_winusb.inf file, I now see "Android ADB Interface" in my Device Manager. However, running adb devices at the command-line does not show the device.

I have another HP slate 7 that shows up just fine under adb devices.

The only difference I see from Device Manager is that the one that works is named "Android Composite ADB Interface" and the other one is named "Android ADB Interface."

There is yet another subtle difference. In the winusb.inf file, for Slate 7 I have two %CompositeAdbInterface% entries defined but for Slate 21, there is just one %CompositeAdbInterface% entry defined.

How can I see my device by running the command adb devices?

5
  • I get this issue often. Having checked the obvious (USB Debugging Enabled) it usually comes down to the cable. Even the official cable isn't always good enough for debugging over USB, as is the case with this Samsung J510 I am trying to debug now. Works for Inspector but does not show up in adb devices. Swapped cable to one I know works, and I can now see it in adb! Jan 14, 2019 at 15:33
  • update your SDK by adding the version of your Android device using the SDK manager Jun 30, 2019 at 23:21
  • There is a promt screen on phone when you connect to device. If you accept it, this will be the easiest solve
    – Nagibaba
    Jul 10, 2019 at 9:23
  • go to developer options and turn on USB debugging May 8, 2022 at 11:10
  • setting - general - about device - click build number many time - back to general - developer options - tick USB debugging Jul 31, 2022 at 21:06

35 Answers 35

250

I had a similar issue and solved with the following steps:

  1. Disconnect device, and ensure to turn off developer options on the android device (if was previously turned on).
  2. Connect the device via USB.
  3. Turn on developer options on the android device.
  4. Enable check box for stay awake.
  5. Enable check box for USB debugging.
  6. Open cmd (or MacOS' console), and cd where your adb executable is.

    Should be in SDK's platform-tools, which you can get from official-site: https://developer.android.com/studio.

  7. Finally, run the commands:
    adb kill-server
    adb start-server
    adb devices
    

Now we can see attached devices.

Note that by following above steps, in most cases the USB-connection mode will be automatically set to MTP (Media Transfer Prorocol), but try setting that manually if it does not happen automatically.

Also, if above-steps do not work for you, try purchasing a new USB-cable, then retry above-steps (with the "new USB-cable").

12
  • 24
    Enable USB debugging was probably the key. This is what worked for me. Mar 21, 2019 at 19:04
  • 5
    I've checked and unchecked Stay awake, and it helped in my case.
    – vitvly
    Aug 21, 2019 at 12:24
  • 13
    I had a bad cable. Changing cables worked.
    – StoriKnow
    Aug 4, 2020 at 20:58
  • I did it as written, but no success. List of devices attached, empty
    – Timo
    Nov 8, 2020 at 17:21
  • 2
    Don't use cheap cables. In my case, I had to use a decent cable. Dec 27, 2022 at 14:54
218

Make sure your device is not connected as a media device.

18
  • 31
    Can confirm that this is critical! On Android 5.0, go to Settings -> Storage -> menu -> USB computer connection and make sure 'Media device (MTP)' is disabled. When it's disabled 'adb devices' lists the device, when enabled not. Tried with both Nexus 4 and Nexus 5.
    – HenrikB
    Mar 10, 2015 at 19:14
  • 35
    going from MTP to "charging" wasn't enough for me, I had to go all the way and say "PTP" for the connection. Sep 18, 2015 at 12:58
  • 13
    Android Nougat: Settings -> Developer options -> Networking -> Select USB Configuration. Changing it to MTP worked for me.
    – sffc
    Sep 5, 2017 at 1:54
  • 13
    For me It worked after Selecting "MIDI" Option Dec 12, 2017 at 6:21
  • 7
    For me MTP didn't work, but PTP did work, although not from the first time, I was also killing and restarting ADB a couple of times, plugged to different USB, toggled off/on USB debugging, revoked USB debugging authorizations, enabled Stay Awake, so I tried all I could, and then after switching to PTP one more time the phone finally showed a question to allow my laptop for debugging.
    – zubko
    Jan 18, 2019 at 14:42
63

In Android 8 Oreo:

  1. go into Settings / Developer Options / Select USB Configuration;
  2. Select PTP (Picture Transfer Protocol).
4
  • 3
    Also the same in Android 5, USB PC connection has to be PTP or adb devices -l will not show the phone. Aug 4, 2018 at 17:55
  • MTP isn't good?
    – Csaba Toth
    Dec 31, 2018 at 0:31
  • They renamed it to Transfer Images, this worked for me.
    – Offir
    Jun 18, 2022 at 7:21
  • What if you cannot access the phone's UI?
    – mxmissile
    Apr 24 at 21:09
54

Looks like the installed driver was in bad state. Here is what I did to make it work:

  1. Delete the device from Device Manager.
  2. Rescan for hardware changes.
  3. List item "Slate 21" will show up with "Unknown driver" status.
  4. Click on "Update Driver" and select /extras/google/usb_driver

Device Manager will find the driver and warn you about installing it. Select "Yes." This time the device got installed properly.

Note that I didn't have to modify winusb.inf file or update any other driver.

Hope this helps.

4
  • Your solution worked for me even today on 20-10-2019 nokia 7.2 :D
    – Ahmed
    Oct 19, 2019 at 20:14
  • What the heck is "/extras/google/usb_driver" supposed to be? It's not part of adb platform-tools.
    – br4nnigan
    Nov 29, 2019 at 18:42
  • THis works I downloaded my drivers from driverscape.com/files/misc/… cos I'm using motorola and update the driver on my device manager . Thanks @peter Dec 6, 2019 at 21:38
  • Where is the device Manager?
    – Timo
    Nov 8, 2020 at 17:23
46

For me the solution was to use a different USB port on my laptop

2
  • I had a usb-c -> 4x usb-a hub on my mac which didn't work but the usb-a on the mac adapter dongle worked.
    – Aleksi
    Apr 12, 2021 at 9:54
  • My original Samsung's cable was a little bit broken and I changed it and worked
    – testing_22
    Jul 6, 2021 at 13:10
45

While many of these solutions have worked for me in the past, they all failed me today on a Mac with a Samsung S7. After trying a few cables, someone suggested that the ADB connection requires an official Samsung cable to work. Indeed, when I used the Samsung cable, ADB worked just fine. I hope this helps someone else!

6
  • 16
    I doubted this. Changing cable worked. Gosh darnit Samsung. Dec 19, 2018 at 11:08
  • 6
    What is special about a Samsung USB cable? How could the phone or computer recognize it? Jun 22, 2019 at 22:42
  • 3
    This was the closest answer for me. The new cable was not official either, the old one was just damaged. It worked for charging and file transfer, but seems that it was not enough for remote debuggery.
    – Oxy
    Jan 2, 2020 at 8:26
  • 1
    Wow changing the cable, plus the answer of @Marco Lackovic to use PTP solved it for me,as both were needed.
    – yoel halb
    Aug 17, 2020 at 5:06
  • 1
    Same here! I've been working with Xamarin Android on many devices, but today, to install an app on my mother Samsung S8, I had to use the official cable. Dec 7, 2020 at 19:35
31

Disable and re-enable "use debug mode" on your telephone

2
  • 2
    Yes, this worked for me too. Just went to Settings -> Developer Options (if this is not available on your phone you need to enable it by following below steps) -> Tick 'Use Debugging' and 'Stay awake' To enable Developer Options go to Settings -> About Device -> Keep tapping on 'Build number' until message will appear saying 'Developer Options have been enabled'. Nov 17, 2017 at 3:43
  • Thanks a lot, after trying all answers above finally tried yours answer and got solution. Thanks. Nov 1 at 7:34
28

In Galaxy s6 - I resolved it by: Settings -> About device -> Software info -> Build number - tap it 7 times to enable Developer options. Go back to Settings -> Developer options -> turn on USB debugging.

Go back to your terminal adb devices and you should see the connected device. Hope that helps.

5
  • The part about tapping settings > about > build fixed my lack of dev support on a yuntab. Thanks!
    – Adam Cox
    Nov 20, 2018 at 15:54
  • I tried all these steps but still 'adb devices'can't find my device. any other thing we need to consider? I am on windows 10 Nov 23, 2018 at 8:44
  • I am using onePlus and same steps settings -> about phone -> build number - tap 7 times. Then go to settings -> developer options -> turn on usb debugging and showed my my device on adb devices tada
    – Rajnikant
    Feb 2, 2020 at 20:26
  • I also had to change to use PTP usb connection after I tapped 7 times and enabled USB debugging. On a Google Pixel3A, fwiw
    – JohnnyFun
    Feb 22, 2021 at 20:11
  • This fixed it!!
    – Jay Na
    Sep 11, 2021 at 2:17
22

I tried everything on this thread but nothing worked. My problem: my computer was charging the device when I was connecting the cable on, so I assumed the cable was working, but not. After I swap the cable, adb devices worked. The cable was the issue.

1
  • I reinstalled drivers, tried different options but no success. Finally I changed the cable and it worked! Later I found out that cable was from device that hadn't been supposed to be connected to PC only charging!
    – Roman
    Jan 24, 2021 at 12:42
19

I also had same problem, i tried to use all the possible solution posted on this thread, but i found out i had same problem as JohnnyFun explained, but as per HenrikB solution i could not find any settings option in my Samsung Galaxy S6 phone ( Android 6.0.1)

Settings -> Storage -> menu -> USB computer connection

I finally figure - when connecting my phone throught charger in pull down menu i see options like -

enter image description here

Then click on "Connected for chargin " >>> you will see options like >>

enter image description here

Over there you can change option to "Transferring media type files"

2
  • Now I need to figure out how to do this when the phone's screen is damaged and won't accept any touch inputs. May 2, 2018 at 16:08
  • For my device, Android 9, "Charging" option was the USB connection way that works. Mar 12, 2021 at 21:55
17

On Android 7.1 Nougat (in my case, a Moto G), manually re-enabling USB debugging on Developer Options did the trick:

Settings > Developer Options > USB debugging

enter image description here

PS C:\> adb devices
List of devices attached
myDeviceNumber      device
1
  • 2
    Everyone assumes that you haven't enabled debugging when you ask this question, but in my case I had. I think the problem might have been that I had never attached this android device to my existing laptop (I had previously debugged on a different laptop). Turning off usb debugging and then plugging the device back in totally solved it. Nov 3, 2020 at 21:05
16

Tried off/on developer/usb options, but turns out swopping for another cable worked. Just in case someone waste time trying everything software.

1
  • how is this different from 3 other answers on this page recommending to replace the cable?
    – Alex P.
    Nov 14, 2018 at 3:22
14

Turning on tethering actually allowed me to install and debug on a LG device and it was the only way it would work

1
  • I use a tablet, no tethering, this can be the problem why it does not work.
    – Timo
    Nov 8, 2020 at 17:29
13

Have you ever reset the adb after you installed the new device?

enter image description here

Or from command line:

  1. Close Eclipse if running
  2. Go to the Android SDK platform-tools directory in Command Prompt (ok, you knew this, i know!)
  3. type adb kill-server
  4. then type adb start-server
  5. Read if there are some errors otherwise try adb devices again
0
12

After trying all the solutions and still not finding a solution, I deduced the problem to the USB cable(s).

Since it was working sometimes for me (ie at work) and not other times (ie at home), I decided to try out different cables and different Android phones I had. And sure enough, some of the cables did not work (adb can't see phone) with any of the phones, but they still charged the phone and Android recognized that it was plugged in.

The good cables obviously charged the phones and were immediately recognized by adb. It was a pretty clear difference.

I couldn't tell the cables apart physically from outside, but all were free USB cables I've gathered over the years.

1
  • Same with me. Worth trying if you're out of ideas. I used an Xbox One controller charge cable in the end.
    – MomasVII
    Nov 2, 2020 at 16:43
7

just try adb kill-server then

adb devices
6
  • Kindly Comment if doesn't work. May 16, 2018 at 10:24
  • 1
    doesn't work dude
    – Black Flag
    Mar 23, 2020 at 18:37
  • 1
    Did not work for me. Aug 14, 2020 at 20:35
  • @EliezerMiron what error you getting ? Aug 17, 2020 at 15:40
  • 1
    No error, the adb interface relaunched just fine. It turns out I just needed to reboot my system after installing the ADB drivers. Aug 17, 2020 at 21:02
7

So the methods mentioned above didn't work for me. What worked for me was googling Samsung Galaxy Tab USB driver and downloading and running the application that got my device recognized when I did adb devices. Since I was using a Samsung Galaxy, I used this link to download the usb driver from the OFFICIAL Samsung site. You would want to google your own respective android model usb driver

http://www.samsung.com/us/support/owners/product/SCH-I925EAAVZW

After downloading it, I ran the application to install my usb driver and then did adb devices. Make sure your Google USB driver from the Android SDK is downloaded and that your sdk is up to date as well. Also, make sure that your USB debugging mode is enable by going to Settings -> Developer Options -> then checking USB debugging. After all this, your device in the Device Manager should not have a yellow exclamation point next to it. When you run adb devices your device should show up. Hope this helps people. I literally spent hours trying to figure this out. Hopefully my answer could save you guys the hours I spent googling.

1
  • LOL. What worked for me was changing my data cable..! Sep 25, 2020 at 7:39
7

Toggling USB debugging off and then back on did the trick for me.

6

For WINDOWS users, Follow the instruction here. https://help.esper.io/hc/en-us/articles/12657625935761-Installing-the-Android-Debug-Bridge-ADB-Tool#:~:text=Installing%20ADB%20on%20Windows,-Windows%20Mac&text=Step%201%3A%20Download%20and%20install,Android%20SDK%20Command%2DLine%20tools

Basically, MTP/PTP all is not needed. You need to configure your device from device manager by following the instruction in screenshots of the page.

Hope it helps.

2
  • Thanks Jolly, this is the correct answer! I tried everything and nothing worked except installing this driver! Thank you!
    – papa zulu
    Nov 4, 2019 at 21:25
  • 1
    Link is 404, please update or remove.
    – mxmissile
    Apr 24 at 20:59
4

adb was not detecting connected nexus 5 device. Switched on the phone, enabled developer options, Enabled USB debugging mode, Now visible with adb. Also, USB configuration is still MTP. Hope this helps.

4

I have an Android LG G4 and the only thing that worked for me was to install the Software Update and Repair tool from my device. Steps:

  • Plug device into usb
  • Make sure developer options are enabled and usb debugging is checked (see elsewhere in thread or google for instructions)
  • Select usb connection type "Software installation":

enter image description here

  • An installation wizard should come up on the computer.
  • At some point during the installation you will see on your phone a prompt that asks "Trust this computer?" with an RSA token/fingerprint. After you say yes the device should be recognized by ADB and you can finish the wizard.
3

I had similar problem with my "Xiaomi Redmi Note 4" and tried almost 10 solutions I found over internet, but none of them helped my case. I've posted this answer to help someones like myself.

Installing "Intel USB Driver for Android Devices" totally solved my problem. It's described completely here.

1
2

Same as other android devices, a new Yuntab also requires going to settings > about and tapping on the build number to enable developer status.

2

Apparently this happens because of many reasons depending on your set up, my particular case:

  • MacOS Ventura 13.3
  • Samsung s23
  • Connected via original phone cable to original Apple usb Dongle (USB to USB c)

Steps:

  1. Go to Android Studio and select "Trouble shoot device connections" enter image description here

  2. You will see that the device recognised the dongle but not the phone itself

  3. disconnect dongle

  4. re-connect dongle with phone connected and click on "rescan devices", it will likely already identify the phone but say that it is waiting for user to authorise USB debugging (even if it is supposed to be on already) enter image description here

  5. go to Developer settings on the phone and turn USB Debugging off and on

  6. Phone will now ask you to allow this particular computer for USB debugging enter image description here

enjoy.

1

For what it's worth, I had problems getting the ADB driver installed from my Windows7 machine. Turned out the Virusscan "access protection" prevented (only some) drivers to be installed properly. Unplugged USB, uninstalled the samsung device from device manager, disabled VS access protection, plugged usb back in and everything was OK. Wasted an hour, hopes it saves you one.

1

I tried all the options in the answers above

  • switch debug mode off and on
  • made USB config - charging
  • made stay awake

None worked . For my samsung J7 mobile downloaded the USB driver
post installation , device started showing in adb devices.

0
1

Click on Attach Debuger to Android Process and Click On Restart ADB.

1

for me the solution was to install de driver from sdk manager:

http://visualgdb.com/KB/usbdebug-manual/

0

In your windows configuration, go to device management. Check if you see your device and if the drivers are installed. You probably do not have the correct drivers installed for your device.

0

Remove battery from phone, wait 10s, re-add it and try it again (alongside developer options etc.. in other questions)

I tried all other answers, but that was required in addition to the other suggestions for me.

Not the answer you're looking for? Browse other questions tagged or ask your own question.