Wednesday, June 25, 2014

LibGDX - How to solve the issue "ADB didn't 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 didn't 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 doesn't 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 didn't ACK" problem.
  1. Enter Command Prompt.
    Go to platform-tools in Android SDK directory.
  2. Type:

    adb nodaemon server


    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


  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 don't 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!

No comments:

Post a Comment