I'm not 100% sure if this should go here or the main Stack Overflow, but I decided to go with this area in hope I might catch someone with more specific experience with a similar problem.

I have a Samsung Captivate (love it minus it's crappy GPS). I do development for it from 2 different computers, one at home, one at work. The machines are both Windows XP, Service Pack 3, 32 bit. I have the same Samsung drivers installed, same versions of Eclipse, etc. The phone is currently rooted running the Serendipity mod, though this issue was exactly the same on the stock firmware.

My home machine (the problem one) is an Athlon 64 2.2 Ghz. My work machine is a Core 2 Duo, don't recall the model.

At work, I can do anything, mount the sdcard on the phone and copy easily, use adb to push, pull, uninstall, install. I can debug in ddms, install through Eclipse, etc, etc...

At home, if I reboot both the computer and phone and pull up a command prompt without having Eclipse open, I MIGHT be able to see the device by typing adb devices. Usually then, I can clear the logcat or run the logcat fairly stable. If I open Eclispe (my development IDE) and try to run a new build of an app, I'll generally lose the connection. The same thing happens if I try to copy files either via mounting or using pull with adb. Some files will copy, and suddenly the connection will be gone and the device will show offline to adb, or not in the list at all, or listed offline twice. Rebooting the phone sometimes helps, but not always. There are times I close Eclipse and every other app, reboot my phone and still end up having adb completely unable to detect the device. I'll use adb kill-server and adb start-server but this generally doesn't help. I use Avast for my anti-virus at home, but have tried without any anti-virus installed at all and it's the same. I've recently reinstalled Windows due to a hard drive crash and it was the exact same. I've tried every different USB port on my tower.

I hope VERY much someone can tell me what's wrong as I've been dealing with this for a year and a half now and it's about to make me lose my mind.

-Jeremiah

  • 1
    I have a similar problem, but it's just a loose connection on the cable I use at home – cjk Aug 16 '11 at 10:18
  • 2
    When I detach and reattach my usb cable, the problem goes away. Don't know if this is a cable problem or some kind of timeout problem. Any clues ? – Trojan.ZBOT Dec 29 '13 at 1:05
  • This happens to me all the time but, for whatever reason, only when I'm debugging in the car. Weird. – Dave Jensen Apr 3 '15 at 20:39
  • My USB cable that shipped with the device is notorious for this problem when debugging. Charging is fine though. Anyway, I swapped to my old (and incidentally shorter) USB cable and now it's working. – Antinous Jul 24 at 9:01

15 Answers 15

Switching from USB 3.0 port to USB 2.0 solved the problem for me. Most laptops come with both port types these days.

  • you saved my day. Old phones keeped disconnecting on usb 3 when installing APK – Climbatize May 25 '16 at 7:22
  • Same issue for me. It was a newer device too ... However, it constantly disconnected when plugged into a 3.0 port. Moving it to a 2.0 port worked great. – Shawn Lehner Jun 28 '17 at 1:01
  • It's amazing, I never think that the problem lies on usb port. – fangzhzh Aug 25 '17 at 2:28

Connect your device through a powered USB hub. Some machines, including new apple macbooks, do not have enough power in the USB ports causing ADB to constantly disconnect.

If your device is rooted, you can connect it to adb via wifi. This is very comfortable, much more than wired USB. Of course you don't always have a rooted device.

  • 1
    Interesting. Anyone else out there have problems with macintosh portables not supplying enough power to connected devices? – Scott Biggs May 27 '15 at 15:14
  • 2
    You don't need WIFI for tcp ip adb. only need to have a working usb adb first to make the adb on the phone listen on tcp/ip. with it connected on usb adb, type adb tcpip 5555 , disconnect usb, type adb connect your.phone.ip.number – Lassi Kinnunen Apr 29 '16 at 5:22
  • I can’t believe I only came across this today. I have a MacBook Pro (Retina, 15-inch, Late 2013) and I’ve had this issue for months and searched all over the internet. My Galaxy S6 would randomly disconnect (often within a fraction of a second, always within about a minute of connecting). I just plugged it in via a powered USB hub and bam! It just works. Thanks, @grebulon. – Pawel Decowski May 17 '16 at 9:28
  • Not sure if that's related or not, but simply switching from the left USB port to the right USB port on a MacBook Pro (Retina, 15-inch, 2012) apparently solved the issue! – jcaron Feb 9 '17 at 13:04

I used to have the same problems and also my logcat would clear and stop updating in Eclipse, the difference is I was on an official Samsung ROM then. After I switched to Darky's ROM the stability has been much better. Still, every now and then the device disappears, but usually it reappears after reattaching the USB. My PC is a bit different from yours (Atom D525, Win7) so I can confirm it's not restricted to a single device/OS.

I'd suggest reflashing the ROM or updating if possible. Or you could try it with another phone to see if it's an error specific to your phone. On the other hand, ADB isn't the stablest of software, so it could be just annoying hiccups.

  • I might try a buddies Vibrant... that is a thought... still, I'm not sure about the Rom being an issue since everything has behaved exactly the same on both the stock firmware and Serendipity... though I have been curious to try Firefly... we'll see. – Maximus Aug 16 '11 at 18:01

To me it sounds you have some bad hardware or drivers at home. Make sure you don't have anything related to Kies running; Kies + Samsung Windows Drivers seem to cause erratic behavior on USB connection that differs between machines...

Try different USB ports and cables first, tho.

  • I tend to agree here... I feel there basically has to be something up/incompatible with my home computer (board/cpu/usb ports). I've had no trouble with any other usb devices though... I use the same cable in both places... so well... I think I'm just screwed. I've been a hair away from upgrading my home machine with a new mobo... so I think that's going to just have to happen. It sucks though, I honestly don't have a need for a faster machine, the development I isn't particularly intense... – Maximus Aug 16 '11 at 17:57

This was annoying me for ages. Logcat would disappear or the phone would need to be reconnected to the USB for ADB to see it properly.

What worked for me was using one of the rear USB ports on my PC. The front ones probably were going through a dodgy hub or perhaps dodgy USB hub software. So if you are using front USB ports, try the ones on the rear.

I was having the same issue with my Nexus 4, running Cyogenmod 11 on Windows 8. I was plugging in using a USB splitter and my phone would keep disconnecting within seconds of being recognized by LogCat / DDMS. Switching to a physical port on my machine did the trick. In my case the front USB ports worked fine.

I was having this disconnect-reconnect problem.

I solved my problem in the Windows USB settings :

1- Open device Manager.
2- Human interface Devices.
3- Right click in one of them or double click.
4- go to power management.
5- Uncheck the option of "Allow the computer to turn off this device to save power" than OK.
Note* try to use step #3-5 on all available option*

(from http://www.tomshardware.co.uk/answers/id-1783536/usb-ports-disconnecting-reconnecting.html)

I'm using an LG G3 marshmallow. I don't know why, but when I go to Developer options > Networking section > Select USB Configuration > MTP fixed it.

Before that, whenever I plug my phone to my PC, the driver installation window always froze at the start, but when I changed to MTP connection, the driver installation window immediately recognized it and the phone icon changed to an LG phone icon and finished installing.

  • Awesome! I Try all the hell of comments here and nothing fix it. This was just a charm! I put the option ""Charging" and fix it, must be some weird issue, but for now works! you safe my life Daniel! – jfcogato Jul 4 at 12:13

Same issue here; I use adb on gnu/linux with no additional drivers.

Workaround Solution: unplug and replug USB

http://forum.xda-developers.com/showthread.php?p=17111464#post17111464

  • Currently, my working method is to (and I still think this sucks) is to build, close Eclipse and plug and unplug till entering adb devices shows the device. If I have more than one showing, adb kill-server, then plug in and adb devices. Extremely tedious. – Maximus Oct 8 '11 at 20:15
  • 2
    Frustratingly, this link goes to a forum, which has a link to another stack exchange site, which links to this thread. – bahamat Feb 20 '13 at 21:59

adb on Debian/Ubuntu is currently as 1.0.29 connecting to android 4.2.2+ devices requires 1.0.31 which causes this error

https://bugs.launchpad.net/ubuntu/+source/android-tools/+bug/1131163

you can either manually install the latest android development kit or wait until the debian folks upgrade teh package

A different issue with the same symptoms when updated to MacOS Sierra. Here's a workaround script:

#!/bin/bash

cat << EOF
###########################################################
# Workaround adb disconnecting issue on macOS Sierra
#
# More info:
# https://code.google.com/p/android/issues/detail?id=219085
# credits to: hans...@meetme.com, vs...@google.com
###########################################################

EOF

function monitor_adb () {
  adb start-server
  echo "[$(date)] adb started"

  while [ "$(adb shell echo 1)" ]; do sleep 5; done

  echo "[$(date)] adb is broken, restarting"

  adb kill-server
  adb start-server || adb start-server
  adb reverse tcp:8081 tcp:8081
}

while [ true ]; do time monitor_adb ; done

I had same issue but only with Android 6/7 devices and Mac host. Solution was...switch device from 'Charging' to 'File transfer' mode.

The following two solutions worked for me.

You can try either of the two or both of them.

  1. Restart device.
  2. Free some internal storage space (Works in most of the cases).

Here's my answer with adb pull emulation workaround based on adb and dd. It continuously retries and resumes download when disconnection happens.

That's too easy :)

Find the location :
android-sdk-windows\platform-tools

open cmd and then do these:

  1. cd c:\android\sdk\android-sdk-windows\platform-tools
  2. adb.exe kill-server
  3. adb.exe start-server

These steps may solve your problem. Good Luck.

  • dont forget, your android-sdk-windows directory maybe different. so you must change string by yourself => c:\android\sdk\android-sdk-windows\platform-tools – msolak Jan 30 '16 at 0:38
  • 1
    OP wrote: "I'll use adb kill-server and adb start-server but this generally doesn't help". – Firelord Jan 30 '16 at 0:47
  • This is a workaround, not a solution. – dm78 Feb 1 '16 at 19:52

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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