20

Running Vista, tried starting adb from shell as admin get daemon not running starting it now

ADB server didn't ACK
* failed to start daemon *

Any help for this?

5

21 Answers 21

26

This problem has annoyed me for a long time. In addition to the above answer, use these tips:

  • Create a bat file with the following and run it. This bat file will solve most of your adb problems.

tskill adb

cd \tools\

adb kill-server

adb start-server

ddms

  • Use the command netstat to monitor the state of connections (adb uses 5037)

  • If the bat file doesn't work try: disconnect-reboot phone-connect. (hint: use `adb reboot' if adb is responding at all, if not do it the old fashioned way)

  • Sometimes Windows can be funny. Reboot the machine.

  • Turn on USB Debugging Mode

    • Download the Android SDK and unzip
    • Uninstall all "Android *" from Device Manager
    • Do an "Add Hardware" from Control Panel, choosing "Install the hardware... (Advanced)"
    • Select "Android USB Devices" and click "Next"
    • Click "Have Disk" and enter the path where the SDK was unzipped
  • Still not working ? Factory reset the phone.

  • MTP detection delays ADB. Sometimes you if need boot time logs you may have to disable the MTP driver in Device Manager (Windows)


This is a brilliant patch for adb when you get the error :

Adb connection Error:An existing connection was forcibly closed by the remote "

2
  • Since you're now the top voted answer, you might consider rephrasing your second sentence or including the information from the other answer...
    – Jeff
    Commented Apr 15, 2016 at 22:03
  • @Jeff ADB is mostly stable now especially after Android M. feel free to suggest edits to this post.
    – Reno
    Commented Apr 16, 2016 at 14:41
16

I was unable to use adb. I got the following error, both on the command line and in eclipse.

* daemon not running. starting it now on port 5037 *
ADB server didn't ACK<br>
* failed to start daemon *

That is, adb start-server failed even after rebooting. To diagnose the problem, I found that you can run adb with the following arguments:

adb nodaemon server

And it will print out the reason that it cannot run. In my case, it was a blank line in the adb_usb.ini file.

7
  • Interestingly, I'm seeing something completely different: this process is hanging, too.
    – Jules
    Commented Feb 7, 2013 at 12:24
  • 1
    adb nodaemon server did the trick. My problem was the same as yours. Blank line in adb_usb.ini
    – Jr. Hames
    Commented Oct 1, 2013 at 16:34
  • Blank line in adb_usb.ini was the cause for me too.
    – robbie613
    Commented Feb 27, 2014 at 23:51
  • Me 2 have the same problem, blank lines in adb_usb.ini Commented Mar 3, 2014 at 21:18
  • 1
    Had the "cannot bind tcp:5037" error as well - if you're using Genymotion this link may help: stackoverflow.com/questions/26431972/…
    – resedasue
    Commented Dec 17, 2014 at 20:36
9

You may have a stuck copy of the adb daemon in memory. Try removing it with Task Manager, or reboot, and see if that helps.

3
  • Thanks for the suggestion but it didn't help.
    – Mike Burke
    Commented Feb 22, 2010 at 3:31
  • 1
    @CommonsWare: that doesn't help Commented Dec 22, 2011 at 18:00
  • 1
    It seems to spawn a new adb process when I quit it.
    – darrenp
    Commented Jan 14, 2013 at 13:06
9

For whoever is using Android Studio and MAC. This is what worked for me:

  1. In Android Studio: Tools -> Android -> Uncheck "Enable ADB Integration"
  2. In terminal: "adb kill-server"
  3. In Android Studio: Tools -> Android -> Check "Enable ADB Integration"
  4. In terminal: "adb start-server"
0
6

The top answer is Windows-specific but this has a decent amount of Google visibility, so if you're running a *nix-like machine (I'm on a Mac), the steps are similar:

$ killall adb
$ cd <PATH_TO_SDK>/platform-tools/
$ adb kill-server
$ adb start-server

Or, if you're like me and just want to access adb no matter your current directory, add

export PATH=${PATH}:<PATH_TO_SDK>/platform-tools/

to your ~/.bash_profile.

4

> killall adb

> adb start-server

Restart Eclipse.

Basically adb is running on another process on your box, and you need to kill it, and start up the daemon again, since they're both trying to bind to the same port (:5037). In my case, I had another window open to :5037, and forgot about it. Wondered why I couldn't stop and start as usual. By going "killall" you make sure you're terminating all processes. You can also go into the CPU's processes and force quit.

1
  • Worth noting that you must first exit Eclipse and shutdown any emulators/genymotion instances. Worked for me.
    – Jay Sidri
    Commented Nov 7, 2014 at 22:22
3
adb nodaemon server

helps. In my case, I had edited ~/.android/adb_usb.ini, and added 0x1949 at the end to enable debugging on the Kindle Fire. Sadly, it could not handle the newline(s) I put in after the 0x1949

1
  • +1 for the extra newline in adb_usb.ini. That was the cause in my case.
    – FooLman
    Commented Mar 26, 2013 at 20:37
3

1.$ apt-get remove android-tools-adb

2.$ cd $PATH_TO_SDK/platform-tools/

3.$ ./adb devices

You will see like this:

  • daemon not running. starting it now on port 5037 * cannot bind 'tcp:5037' ADB server didn't ACK * failed to start daemon *

That show what errors.

Now you reset you PC, it will well.

Or

# lsof -i:5037

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME

wineserve 3609 root 268u IPv4 20118 0t0 TCP localhost:5037 (LISTEN)

# 

You will know which software use the port.

0
2

To avoid this simply change the following values in your host_config.xml:

<!-- Number of tests executed between reboots. A value <= 0 disables reboots. -->
<IntValue name="maxTestCount" value="10000" />
<!-- Max size [tests] for a package to be run in batch mode. -->
<IntValue name="maxTestsInBatchMode" value="100000" />

<!-- Max time [ms] between test status updates. -->
<IntValue name="testStatusTimeoutMs" value="600000" />
1

I had the same problem. I had improperly edited my adb_usb.ini file (I had two carriage returns at the end of the file...yes this was hard to find.)

This file is located somewhere similar to /Users/{user-name}/.android/adb_usb.ini

(replace {user-name} with your own user name)

Make sure the file reads EXTACTLY (No spaces/carriage returns/line breaks before or after):

'# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT."
'# USE 'android update adb' TO GENERATE."
'# 1 USB VENDOR ID PER LINE."

(IMPORTANT!!! There are no ' (apostrophes) in the actual file, this was the only way for me to post this without it interpreting the # for BOLD).


Hope that helps someone

1

If you're using Android Studio, if

  • you have the "Device chooser" dialog open
  • you try to run "adb devices" from your command line

it leads every single time to the following error

adb server is out of date.  killing...
cannot bind 'tcp:5037'
ADB server didn't ACK
* failed to start daemon *
error:

SOLUTION (easy and quick)

Close the "Device chooser" dialog. My guess is that it tries to take over the adb connection in a.. very intensive way.

1

I'm facing this issue with Genymotion, so I've replaced it's adb with my current adb. For reference:

cd $GENYMOTION_HOME\tools
mv adb adb-old
ln -s $ANDROID_SDK\platform-tools\adb adb
0

There is yet another possibility. If you have installed any permission managers, like Advanced android permission manager , the adb may fail.It was my case. Uninstalled the app and then no issues.

0

It seem are the same, but sometime, the command adb kill-server have no effect (at least is in my case). So, i have tried other way.

You can check this way: https://stackoverflow.com/a/34627522/5597864

0

In a console, try:

taskkill /F /T /IM adb.exe

Do this many times, until it says ERROR: The process "adb.exe" not found. Then

adb devices
0

The adb server is not running. you can open the command line window in Windows to check which process is using the 5037 port, remember the process number.

netstat -ano |findstr "5037"

Then use the Ctrl+alt+delete to open the process manager to kill the process which is possessing the 5037 port. You maybe need to try this several times until the 5037 port is free to use.

0

Open Command Navigate your adb.exe file where is located Reach into the file on command adb kill-server adb start-server

0

When it additionally says that adb server is out of date. killing... it kills it for you. The problem is it restarts as soon as was killed.

So you should consider finding the adb.exe wherever it could be. The simplest way to do that is opening a Task Manager, finding an adb.exe process -> RMB -> Open file location -> delete it from there. Unless it's not needed, in this case you should update it. In my case it was in C:\Windows\ and came with their Visual Studio.

0

If you are getting the error cannot bind 'tcp:5037' and you are using any Linux distribution such as Ubuntu,

Kill old ADB process:

fuser -n tcp -k 5037

This will kill the adb process at port 5037 and then,

Start ADB:

adb start-server
0

Usually the answers given here worked for me, but today they didn't. My problem was fixed by updating the emulator and SDK to the latest versions from the SDK manager.

-1

On A Mac or Unix

For those of you coming here with on Mac or Unix, the following worked for me:

adb kill-server
adb server
0

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