'ADB freezes on any command
I somehow can't get ADB to work on my windows machine
everytime i try to run adb devices or adb start-server it freezes and does nothing, it only prints * daemon not running; starting now at tcp:5037
With logging it shows the following:
adb.exe D 02-10 19:06:54 21236 13536 adb_trace.cpp:187] Android Debug Bridge version 1.0.41
adb.exe D 02-10 19:06:54 21236 13536 adb_trace.cpp:187] Version 32.0.0-8006631
adb.exe D 02-10 19:06:54 21236 13536 adb_trace.cpp:187] Installed as C:\Users\Felix\AppData\Local\Android\Sdk\platform-tools\adb.exe
adb.exe D 02-10 19:06:54 21236 13536 adb_trace.cpp:187]
adb.exe D 02-10 19:06:54 21236 13536 adb_client.cpp:351] adb_connect: service: host:start-server
adb.exe D 02-10 19:06:54 21236 13536 adb_client.cpp:160] _adb_connect: host:version
adb.exe D 02-10 19:06:56 21236 13536 sysdeps_win32.cpp:1032] could not connect to tcp:5037: cannot connect to 127.0.0.1:5037: No connection could be made because the target machine actively refused it. (10061)
adb.exe D 02-10 19:06:56 21236 13536 sysdeps_win32.cpp:602] _socket_set_errno: mapping Windows error code 10061 to errno 22
* daemon not running; starting now at tcp:5037
adb D 02-10 19:06:56 22512 1472 adb_trace.cpp:187] Android Debug Bridge version 1.0.41
adb D 02-10 19:06:56 22512 1472 adb_trace.cpp:187] Version 32.0.0-8006631
adb D 02-10 19:06:56 22512 1472 adb_trace.cpp:187] Installed as C:\Users\Felix\AppData\Local\Android\Sdk\platform-tools\adb.exe
adb D 02-10 19:06:56 22512 1472 adb_trace.cpp:187]
I have adb installed through android studio, but i also tried downloading it manually. There is also no other program running, which could block the port.
I also tried
- disabling ipv6, cause i read somewhere that this solved the issue.
- running it from a different directory
- run it from windows terminal, powershell, cmd
- run it from an elevated terminal
The weird thing is, it sometimes works when android studio starts, but it will never work from the terminal.
i am really out of ideas, as to why this happens.
UPDATE: it seems to be a version issue, but i still don't know why the version 29.0.6 seems to be the last working version everything newer has the issues stated above. Funnily enough, 29.0.6 still isn't working if started by android studio.
Solution 1:[1]
Most likely again what you encounter is caused by one of the bugs introduced with adb of platform-version 32.0. There were quite a few questions on similat topics on all operating systems used by Android developers.
As at the moment (2022-02-11) there is no newer version of adb versions that fixes this problem the recommended way is to downgrade abd to version 31.0:
These are the download urls at Google for the 31.0.3 version:
Solution 2:[2]
I Think you need to kill and restart adb. that's work for me. so you can try out this. Open Command prompt and go to
android sdk>platform-tools>
adb kill-server
press enter
and again
adb start-server
press enter
Solution 3:[3]
Make sure you set the proper path of ADB in windows environment variable explicitly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Robert |
| Solution 2 | Vivek Kuvadiya |
| Solution 3 | amit bhalla |
