I an unable to run
system/core/adb/sysdeps_win32.c::socket_loopback_client():socket_loopback_client: could not connect
system/core/adb/adb_client.c::adb_connect():adb_connect: service root:
* daemon not running. starting it now on port 5037 *
CreateProcess failure, error 2
* failed to start daemon *
error: cannot connect to daemon
I solved this problem long ago, but did not update this question.
I was having this issue because I was running the incorrect adb executable. I had one executable in
C:\Windows\system32 and another in a different directory. The version in
C:\Windows\system32 had did not have all the files needed by adb whereas the version in the other directory did. I'm not sure what those files were, but the adb executable was the same version in both directories. Since
C:Windows\system32 was in the PATH first, that version was executed first. I removed adb from the Windows directory, and the problem went away.