56

I am trying to install my project on 5 AVD's at the same time, but I constantly get this error, I am executing it on Windows 8.1

"* daemon not running. starting it now on port 5037 *
ADB server didn't ACK
* failed to start daemon *
error: cannot connect to daemon"

I have tried reading all possible posts on stackoverflow concerning this error, and all of them just mention that try to kill the adb process and restart eclipse and then all will be fine. I have tried the method mentioned in the posts and along with that I have also turned off my security and firewall, so that there is no obstruction on the port 5037. Somebody please help me as I need to execute my project and I am not able to do so :(. For your reference I can provide the output of the following command "netstat -ano | findstr "5037""

 TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       7144
 TCP    127.0.0.1:5037         127.0.0.1:57410        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57411        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57414        ESTABLISHED     7144
 TCP    127.0.0.1:5037         127.0.0.1:57415        ESTABLISHED     7144
 ...

Somebody please suggest a workaround this problem, what might be the cause of this. Also you can take a look at the following image to infer what might be happening.

janot
  • 10,962
  • 1
  • 23
  • 56
AnkitSablok
  • 2,715
  • 5
  • 26
  • 51
  • 1
    sometimes overzealous firewall settings can cause that. make sure that local processes can connect to 5037 – Alex P. May 02 '14 at 01:49
  • 3
    go there [enter link description here][1] [1]: http://stackoverflow.com/questions/5703550/my-eclipse-adb-server-didnt-ack-failed-to-start-daemon – mouayad Oct 28 '14 at 06:50

9 Answers9

97

Try the following:

  • Close Eclipse.
  • Restart your phone.
  • End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.
  • Issue kill and start command in \platform-tools\
    • C:\sdk\platform-tools>adb kill-server
    • C:\sdk\platform-tools>adb start-server
  • If it says something like 'started successfully', you are good.
stack247
  • 4,960
  • 2
  • 35
  • 53
34

For anyone using OSX (I'm aware OP isn't): What worked for me in the end was removing the android settings folder in the home directory.

rm -Rf ~/.android
Ben Pearson
  • 6,882
  • 4
  • 28
  • 49
19

For me it didn't work , it was related to a path problem happened after android studio 2.0 preview 1, I needed to update genymotion and virtual box, and apparently they tried to use same port for adb.

Solution is explained here link! Basically you just need to:

1) open genymotion settings

2) specify sdk path for the adb manually

3) adb kill-server

4) adb start-server

Abdelilah El Aissaoui
  • 2,266
  • 1
  • 16
  • 40
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes – Nehal Mar 16 '16 at 11:42
  • @Ms.Nehal is it better now? made a different structure in the answer so it's more readable but the essential steps are all there Thank for your help , first time contributing here. – mario romano lopez Mar 16 '16 at 14:35
  • romano lope, yes the answer is better now but since I didn't downvote your answer so I cannot do anything with that – Nehal Mar 17 '16 at 05:23
  • Thanks, This helped me fix the error – Sachidananda Naik May 24 '17 at 18:07
  • Specifying the `sdk path for the adb manually` is the key for me. – Arpit Aggarwal Jun 03 '19 at 16:30
9

Similar questions are

First close IDE.

In my case I killed adb via Task Manager(adb kill-server did not work)
then adb start-server

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *

If you see "started successfully" than it is solved, now start IDE.

Community
  • 1
  • 1
Paul Verest
  • 51,779
  • 39
  • 174
  • 288
4

On my Mac, I wrote this code in my Terminal:

xxx-MacBook-Pro:~ xxx$ cd /Users/xxx/Documents/0_Software/adt20140702/sdk/platform-tools/

xxx-MacBook-Pro:platform-tools xxx$ ./adb kill-server

xxx-MacBook-Pro:platform-tools xxx$ ./adb start-server

  • daemon not running. starting it now on port 5037 *
  • daemon started successfully *

xxx-MacBook-Pro:platform-tools tuananh$

Hope this help.

octohedron
  • 3,868
  • 6
  • 42
  • 69
777Q
  • 369
  • 3
  • 5
2

if you are using any mobile suit like mobogenie or something that might also will make this issue. try killing that too from the task manager.

Note : i faced the same issue, tried the above solution. That didn't work, finally found out this solution.May useful for someone else!..

1

On my end, I used Resource Monitor to see which application was still listening to port 5037 after all the Eclipse and adb restart were unsuccessful for me.

Start > All Programs > Accessories > System Tools >
Resource Monitor > Network > Listening Ports

This eventually showed that java.exe was listening to port 5037, hence, preventing adb from doing so. I killed java.exe, immediately start adb (with adb start-server) and received a confirmation that adb was able to start:

android-sdks\platform-tools>adb start-server
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
Adron
  • 45
  • 8
0

I've got a kind of botch for the old ADB server didn't ACK * failed to start daemon * issue which might help, though i haven't seen anyone else with my problem so maybe not. Anyway...

I changed the default install location for my HTC sensation to 2 (SD card), but when trying to revert back to 0 (internal) i was getting this error. Looking in task manager showed there were 2 instances of adb.exe running, one of which kept stopping and starting and was impossible to kill, the other could be killed but then a new instance would start almost immediately.

The only way i could get adb to start successfully was to get my command ready in the command window, go to task manager to end the adb.exe, then when the window came up saying 'are you sure you want to kill adb.exe' dragged that over the command window, clicked OK then immediately pressed Enter to run the command. It seems that the short window between adb.exe being killed and restarting itself is sufficient to run a command, though if you try to do something else it won't work and you have to repeat this process each time you want to run a command.

PITA but it's the only way an uneducated numpty like myself could get round it - hopefully it'll help someone...

Oursoul
  • 1
  • 1
-3

i have solve this problem several times using the same steps :

1- Close Eclipse.

2- Restart your phone.

3- End adb.exe process in Task Manager (Windows). In Mac, force close in Activity Monitor.

4- Issue kill and start command in \platform-tools\

C:\sdk\platform-tools>adb kill-server

C:\sdk\platform-tools>adb start-server

5- If it says something like 'started successfully', you are good.

but now it's doesn't work cause i have an anti-virus called "Baidu", this program have run "Baidu ADB server", finally i turn this process off and retry above steps it's work properly.