244

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?

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
Peter
  • 11,260
  • 14
  • 78
  • 155
  • 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! – Austin France Jan 14 '19 at 15:33
  • update your SDK by **adding the version of your Android device** using the SDK manager – Mike D3ViD Tyson Jun 30 '19 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 '19 at 09:23
  • go to developer options and turn on USB debugging – FatemehEbrahimiNik May 08 '22 at 11:10
  • setting - general - about device - click build number many time - back to general - developer options - tick USB debugging – hadi almosavi Jul 31 '22 at 21:06

34 Answers34

242

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").

Top-Master
  • 7,611
  • 5
  • 39
  • 71
Pramod
  • 3,217
  • 3
  • 20
  • 26
218

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

JohnnyFun
  • 3,975
  • 2
  • 20
  • 20
  • 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 '15 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. – Emmanuel Touzery Sep 18 '15 at 12:58
  • 13
    Android Nougat: Settings -> Developer options -> Networking -> Select USB Configuration. Changing it to MTP worked for me. – sffc Sep 05 '17 at 01:54
  • 13
    For me It worked after Selecting "MIDI" Option – Azhar Bandri Dec 12 '17 at 06:21
  • For me, in Android 7.1.1, I had to change the USB connection from "File transfer" to "Photo transfer". Thanks for this answer, though. – Pistos Aug 26 '18 at 22:03
  • I will also note, though, that I had to change it BACK to "File transfer" mode before Android Studio would run code on my device. I also needed to adjust my udev rules (added my specific device), and ensure the Linux user running Android Studio was in the plugdev group (Gentoo). At that point, I was prompted to allow debugging from the connected computer. – Pistos Aug 26 '18 at 22:26
  • I couldn't find Developer options. It turned out that you need to click multiple times on "Kernel" field in About section to turn on the Developer Options. (it's for security) – tuhaj Dec 06 '18 at 14:28
  • 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 '19 at 14:42
  • On my phone with Android 8.0, I enabled the "USB debugging" and the device was listed in the devices list (tip for linux users: use the "watch -n1 adb devices" command, in order to catch the "real time" update of devices list). Choose PTP or MTP was indifferent for me. The device was listed anyway. – bitfox Jan 29 '19 at 09:59
  • I also have to select `Enable view attribute inspection`. – jezmck Mar 05 '19 at 09:28
  • How do I set this setting with an Oculus Go? – Aaron Franke Jun 13 '19 at 02:21
  • Android 9 here: Go to `Settings` -> `Developer options` -> and then change `Default USB configuration` – João Pimentel Ferreira Jun 11 '20 at 22:03
  • 2
    you will not believe, there is one more solution: If all these solutions doesn't work, you might have issue in usb cable you would be using. I had used a bluetooth speaker's cable, that doesn't support usb debugging. So beware of cable. Use only the phone's cable. – Sunil Kumar Jul 17 '20 at 16:44
  • for certain devices - 'Transfer Files' option does the job – abhijat_saxena Sep 01 '20 at 13:53
  • 1
    Android 10 here. I just select MIDI then boom, it's now connected. Thanks – Lynnell Neri Dec 05 '20 at 00:57
  • After trying lots of things I got mine to work by connecting with the wireless adb command `adb connect 192.168.0.x`. Once my computer registered the device over the wireless network it didn't seem to have any issues connecting with USB. – aashtonk Feb 15 '21 at 19:41
  • On a OP9 Pro: `Developer Options > Select USB Configuration > PTP (Picture transfer protocol)` – Joel G Mathew Feb 20 '22 at 02:16
  • @sffc, Azhar, Pistos, HenrikB, zubko. Regardless of all those settings, are you guys sure that toggling USB Debugging was not all that was needed? – Pacerier Feb 14 '23 at 22:11
63

In Android 8 Oreo:

  1. go into Settings / Developer Options / Select USB Configuration;
  2. Select PTP (Picture Transfer Protocol).
Marco Lackovic
  • 6,077
  • 7
  • 55
  • 56
53

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.

Peter
  • 11,260
  • 14
  • 78
  • 155
  • Your solution worked for me even today on 20-10-2019 nokia 7.2 :D – Ahmed Oct 19 '19 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 '19 at 18:42
  • THis works I downloaded my drivers from https://www.driverscape.com/files/misc/Motorola_End_User_Driver_Installation_6.2.0_64bit.zip cos I'm using motorola and update the driver on my device manager . Thanks @peter – Ahmed Adewale Dec 06 '19 at 21:38
  • Where is the device Manager? – Timo Nov 08 '20 at 17:23
46

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

Jesse
  • 1,332
  • 2
  • 14
  • 25
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!

Mike Swanson
  • 3,337
  • 1
  • 17
  • 15
  • 16
    I doubted this. Changing cable worked. Gosh darnit Samsung. – Philip Whitehouse Dec 19 '18 at 11:08
  • 6
    What is special about a Samsung USB cable? How could the phone or computer recognize it? – ProGirlXOXO Jun 22 '19 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 02 '20 at 08: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 '20 at 05: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. – Florian Burel Dec 07 '20 at 19:35
  • 1
    It's 2022 and I can confirm that this works for me. Silly Samsung. – Leonard Dec 17 '22 at 21:14
29

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

Trong Lam Phan
  • 2,292
  • 3
  • 24
  • 51
  • 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'. – marika.daboja Nov 17 '17 at 03:43
27

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.

Anita
  • 2,741
  • 27
  • 28
  • The part about tapping settings > about > build fixed my lack of dev support on a yuntab. Thanks! – Adam Cox Nov 20 '18 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 – user2243747 Nov 23 '18 at 08: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 02 '20 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 '21 at 20:11
  • This fixed it!! – Jay Na Sep 11 '21 at 02: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.

Estevão Lucas
  • 4,440
  • 34
  • 37
  • 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 '21 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"

Manisha
  • 813
  • 13
  • 24
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
Edumelzer
  • 1,066
  • 1
  • 11
  • 22
  • 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. – John Bowers Nov 03 '20 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.

resting
  • 16,287
  • 16
  • 59
  • 90
14

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

Snorkeler
  • 326
  • 2
  • 3
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
Carlos Robles
  • 10,828
  • 3
  • 41
  • 60
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.

Edward Tan
  • 934
  • 9
  • 17
  • Same with me. Worth trying if you're out of ideas. I used an Xbox One controller charge cable in the end. – MomasVII Nov 02 '20 at 16:43
7

just try adb kill-server then

adb devices
Vivek Samele
  • 340
  • 4
  • 8
7

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

Zachary Wand
  • 346
  • 4
  • 11
6

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.

dtong
  • 149
  • 1
  • 8
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.

jolly
  • 3,353
  • 1
  • 15
  • 21
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.

dresh
  • 383
  • 1
  • 11
  • 18
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.
Matthew
  • 668
  • 5
  • 12
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.

Hosein
  • 581
  • 1
  • 7
  • 29
  • 1
    Thanks, this worked for me with a Xiaomi Redmi 5A, but the referenced link changed, I found the download link here: https://software.intel.com/content/www/us/en/develop/articles/intel-usb-driver-for-android-devices.html – Juliao Oct 07 '20 at 00:12
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.

Adam Cox
  • 3,341
  • 1
  • 36
  • 46
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.

geert3
  • 7,086
  • 1
  • 33
  • 49
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.

Tanmay Patil
  • 659
  • 1
  • 4
  • 21
1

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

Nadeem Bhat
  • 1,032
  • 7
  • 10
1

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

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

Cateno Viglio
  • 407
  • 11
  • 25
1

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.

Carlos Valencia
  • 6,499
  • 2
  • 29
  • 44
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.

Robin Dijkhof
  • 18,665
  • 11
  • 65
  • 116
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.

Jethro
  • 3,029
  • 3
  • 27
  • 56
0
  • Pull down the Notifications Bar.
  • Tap the item (for example "File transfer") that has the small text "Tap to change USB options" at the bottom.
  • Tap "Charging"
  • Tap "Just once" or "Always", depending on what you prefer. If you're unsure, tap "Just once".
  • Tap "OK".

Note: Before these steps, I tried this answer, but that didn't help and I doubt that those steps were necessary for my solution.

root
  • 1,812
  • 1
  • 12
  • 26
-1

Switching cables worked for me...

Musab Gulfam
  • 126
  • 1
  • 7
-3

I was having same problem in my ubuntu. When I run command adb devices it shows me ?????????? No permission.

Then I tried with adb kill-server and then sudo su and adb devices. No need to run command adb start-server devices command will start it automatically if it is not already started.

Hope this will save once one's minutes.

Saurin Dashadia
  • 1,140
  • 11
  • 25
-5

Try to update the ADB and the phone itself.

Then if it still doesn't work try to

connect the phone with then without usb debugging,

or with then without usb storage on.

Carlos Robles
  • 10,828
  • 3
  • 41
  • 60
Recon
  • 331
  • 1
  • 3
  • 7