Tuesday, December 20, 2016

LibGDX How to solve the issue ADB didnt ACK failed to start daemon

LibGDX How to solve the issue ADB didnt ACK failed to start daemon


After the Import of the Gradle Project in the Eclipse, you can immediately debug it to see how the default project looks like.

The fastest way to see what the existing codes work is to Run / Debug the Desktop directory.

However, if you are only interested on the performance in the Android device, you could straightaway connect it to your PC, and Run / Debug the Android directory.

Now everything is intuitive until the error hits you:

"ADB didnt ACK, failed to start daemon"


What the heck is this and how to solve this issue?

Of course, search engines could get you some results. However, I am surprised to find that the most voted solution doesnt really provide a big picture of what went wrong. It takes me hours to find out that, it is the answer by vladof (in this link) that really sheds some lights on how to cope with this issue more thoroughly.

Since his answer is getting drowned, here I show it again (with minor modification) - The most complete solution for the "ADB didnt ACK" problem.
  1. Enter Command Prompt.
    Go to platform-tools in Android SDK directory.
  2. Type:

    adb nodaemon server

    Output:

    cannot bind tcp:5037

  3. This implies that the port 5037 is occupied by something else. Type the command below to see who is the culprit:

    netstat -ano | findstr 5037

    Output:



  4. Note that the process with PID 4888 is occupying port 5037.
  5. Open Task Manager, click on Processes tab, find the process and kill it, tfadb.exe in this case. If you dont see the PID column, you may add it from the "Views" tab. Repeat the process from 2 - 5 if observe the similar situations again.


  6. Retry adb kill-server and adb start-server, you will notice that the daemon will start successfully. :)
Hopefully this helps!

Available link for download