Reputation: 1
daemon not running; adb: CreateFileW 'nul' failed: The system cannot find the file specified. I'm getting this error on running an app. The gradle does complete build and the emulator also runs with android but the app doesn't open and I can't find it either in the apps of the device. And I am using one of those default templates when you create a new project without any modifications. I have tried downloading and replacing three files ( adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) in the platform-tools in appdata. It says run manually if necessary. So i went to that directory and ran the command: adb start-server, in the command prompt but it gives the same error:
C:\Users\samir\AppData\Local\Android\Sdk\platform-tools>adb start-server
* daemon not running; starting now at tcp:5037
adb: CreateFileW 'nul' failed: The system cannot find the file specified. (2)
* failed to start daemon
error: cannot connect to daemon
How do I fix this?
Upvotes: 0
Views: 2234
Reputation: 2207
I have te same error since a couple of months on Windows 11. None of the adblink-version from Jocala are running anymore. Only working fix for me: run "adb.exe nodaemon server" in a DOS-window and keep it running. then open a second DOS-window and use the known adb-commands like "adb connect 192.168.1.x" etc.
I guess that even the adbLink tools would work, but unfortunately they are first killing the background server previously started via the above comand and then they are failing to start the server as a daemon.
Upvotes: 0
Reputation: 11
6 months later but just encountered this problem.
Found the solution after digging for 5 hours based on this: https://issuetracker.google.com/issues/169425447
Basically need to modify the register key "Start" found on:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Null\Start
to 1
I don't know why I had that disabled but changing it and restarting fixed everything. Hope to help someone.
Upvotes: 1