ADB 突然停止在我的 Windows 计算机上工作。我尝试连接的设备是 Meta Quest 3,开发人员中心、文件浏览器和 Quest Link 都检测到它,但是,
adb device
命令冻结。运行时,使用 ADB_TRACE=all
,服务器(使用 adb nodaemon server
运行)在运行时输出 adb devices
:
01-06 23:11:10.499 42764 49292 D adb : fdevent_poll.cpp:187 (fdevent 1: fd 2048 R) got events 1
01-06 23:11:10.500 42764 49292 D adb : sysdeps_win32.cpp:1255 adb_socket_accept on fd 2048 returns fd 2060
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:455 LS(1): created (fd=2060)
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:974 Connecting to smart socket
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:962 Creating smart socket
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:969 SS(0)
01-06 23:11:10.500 42764 49292 D adb : fdevent_poll.cpp:85 fdevent_set: (fdevent 10: fd 2060 R), events = 1
01-06 23:11:10.500 42764 49292 D adb : fdevent_poll.cpp:114 --- --- waiting for events
01-06 23:11:10.500 42764 49292 D adb : fdevent_poll.cpp:136 poll(), pollfds = 2048(R) 2050(R) 2052(R) 2053(R) 2054(R) 2055(R) 2056(R) 2057(R) 2058(R) 2059(R) 2060(R)
01-06 23:11:10.500 42764 49292 D adb : fdevent_poll.cpp:187 (fdevent 10: fd 2060 R) got events 1
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:384 LS(1): event_func(fd=2060(==2060), ev=0001)
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:188 LS(1): post adb_read(fd=2060,...) r=16 (errno=0) avail=1048576
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:188 LS(1): post adb_read(fd=2060,...) r=-1 (errno=11) avail=1048560
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:203 LS(1): fd=2060 post avail loop. r=-1 is_eof=0
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:790 SS(0): enqueue 16
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:810 SS(0): len is 12
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:819 SS(0): 'host:version'
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:823 service request: 'host:version'
01-06 23:11:10.500 42764 49292 D adb : adb.cpp:1265 handle_host_request(version)
01-06 23:11:10.500 42764 49292 D adb : adb_io.cpp:107 writex: fd=2060 len=4 4f4b4159 OKAY
01-06 23:11:10.500 42764 49292 D adb : adb_io.cpp:107 writex: fd=2060 len=8 3030303430303239 00040029
01-06 23:11:10.500 42764 49292 V adb : sockets.cpp:862 SS(0): handled host service 'version'
01-06 23:11:10.500 42764 49292 D adb : sockets.cpp:952 SS(0): closed
01-06 23:11:10.501 42764 49292 D adb : sockets.cpp:345 entered local_socket_close. LS(1) fd=2060
01-06 23:11:10.501 42764 49292 D adb : sockets.cpp:331 LS(1): destroying fde.fd=2060
01-06 23:11:10.501 42764 49292 D adb : sysdeps_win32.cpp:1332 adb_shutdown: 2060(accept:2048(lo-server:5037
01-06 23:11:10.501 42764 49292 D adb : fdevent_poll.cpp:85 fdevent_set: (fdevent 11: fd 2060 R), events = 1
01-06 23:11:10.501 42764 49292 D adb : sockets.cpp:367 LS(1): closed
01-06 23:11:10.501 42764 49292 D adb : sockets.cpp:218 LS(1): fd=2060 post peer->enqueue(). r=-1
01-06 23:11:10.501 42764 49292 D adb : fdevent_poll.cpp:114 --- --- waiting for events
01-06 23:11:10.501 42764 49292 D adb : fdevent_poll.cpp:136 poll(), pollfds = 2048(R) 2050(R) 2052(R) 2053(R) 2054(R) 2055(R) 2056(R) 2057(R) 2058(R) 2059(R) 2060(R)
01-06 23:11:10.814 42764 53980 D adb : usb_windows.cpp:279 AdbCreateInterfaceByName failed: Access is denied. (5)
01-06 23:11:10.814 42764 53980 D adb : usb_windows.cpp:442 usb_cleanup_handle
01-06 23:11:10.876 42764 54552 D adb : sysdeps_win32.cpp:1032 could not connect to tcp:5561: cannot connect to 127.0.0.1:5561: No connection could be made because the target machine actively refused it. (10061)
01-06 23:11:10.876 42764 54552 D adb : sysdeps_win32.cpp:602 _socket_set_errno: mapping Windows error code 10061 to errno 22
adb devices
输出
01-06 23:11:10.498 35432 35508 D adb : adb_trace.cpp:198 Android Debug Bridge version 1.0.41
01-06 23:11:10.498 35432 35508 D adb : adb_trace.cpp:198 Version 35.0.2-12147458
01-06 23:11:10.498 35432 35508 D adb : adb_trace.cpp:198 Installed as C:\Users\meponder\AppData\Local\Android\Sdk\platform-tools\adb.exe
01-06 23:11:10.498 35432 35508 D adb : adb_trace.cpp:198 Running on Windows 10.0.26100
01-06 23:11:10.498 35432 35508 D adb : adb_trace.cpp:198
01-06 23:11:10.498 35432 35508 D adb : commandline.cpp:1697 Using server socket: tcp:5037
01-06 23:11:10.499 35432 35508 D adb : adb_client.cpp:160 _adb_connect: host:version
01-06 23:11:10.499 35432 35508 D adb : sysdeps_win32.cpp:1040 port 5037 type tcp => fd 2048
01-06 23:11:10.500 35432 35508 D adb : adb_io.cpp:107 writex: fd=2048 len=16 30303063686f73743a76657273696f6e 000chost:version
01-06 23:11:10.500 35432 35508 D adb : adb_io.cpp:81 readx: fd=2048 wanted=4
01-06 23:11:10.500 35432 35508 D adb : adb_io.cpp:97 readx: fd=2048 wanted=4 got=4 4f4b4159 OKAY
01-06 23:11:10.500 35432 35508 D adb : adb_client.cpp:194 _adb_connect: return fd 2048
01-06 23:11:10.500 35432 35508 D adb : adb_io.cpp:81 readx: fd=2048 wanted=4
即使设备断开连接并且所有其他 Android 设备也断开连接,
devices
命令输出是相同的,并且服务器输出是
01-06 23:16:12.215 26008 41892 D adb : fdevent_poll.cpp:187 (fdevent 10: fd 2060 R) got events 1
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:384 LS(1): event_func(fd=2060(==2060), ev=0001)
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:188 LS(1): post adb_read(fd=2060,...) r=16 (errno=0) avail=1048576
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:188 LS(1): post adb_read(fd=2060,...) r=-1 (errno=11) avail=1048560
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:203 LS(1): fd=2060 post avail loop. r=-1 is_eof=0
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:790 SS(0): enqueue 16
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:810 SS(0): len is 12
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:819 SS(0): 'host:version'
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:823 service request: 'host:version'
01-06 23:16:12.215 26008 41892 D adb : adb.cpp:1265 handle_host_request(version)
01-06 23:16:12.215 26008 41892 D adb : adb_io.cpp:107 writex: fd=2060 len=4 4f4b4159 OKAY
01-06 23:16:12.215 26008 41892 D adb : adb_io.cpp:107 writex: fd=2060 len=8 3030303430303239 00040029
01-06 23:16:12.215 26008 41892 V adb : sockets.cpp:862 SS(0): handled host service 'version'
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:952 SS(0): closed
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:345 entered local_socket_close. LS(1) fd=2060
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:331 LS(1): destroying fde.fd=2060
01-06 23:16:12.215 26008 41892 D adb : sysdeps_win32.cpp:1332 adb_shutdown: 2060(accept:2048(lo-server:5037
01-06 23:16:12.215 26008 41892 D adb : fdevent_poll.cpp:85 fdevent_set: (fdevent 11: fd 2060 R), events = 1
01-06 23:16:12.215 26008 41892 D adb : sockets.cpp:367 LS(1): closed
01-06 23:16:12.216 26008 41892 D adb : sockets.cpp:218 LS(1): fd=2060 post peer->enqueue(). r=-1
01-06 23:16:12.216 26008 41892 D adb : fdevent_poll.cpp:114 --- --- waiting for events
01-06 23:16:12.216 26008 41892 D adb : fdevent_poll.cpp:136 poll(), pollfds = 2048(R) 2050(R) 2052(R) 2053(R) 2054(R) 2055(R) 2056(R) 2057(R) 2058(R) 2059(R) 2060(R)
01-06 23:16:12.372 26008 46684 D adb : sysdeps_win32.cpp:1032 could not connect to tcp:5555: cannot connect to 127.0.0.1:5555: No connection could be made because the target machine actively refused it. (10061)
01-06 23:16:12.373 26008 46684 D adb : sysdeps_win32.cpp:602 _socket_set_errno: mapping Windows error code 10061 to errno 22
到目前为止,我已经重新安装了 adb 驱动程序,尝试从平台工具 29.0.6、31.0.3、34.0.4 和 35.0.2 中使用 adb,并使用就地升级重新安装了 Windows。直到最近,ADB 都运行得很好,而且我还没有升级任何 Android 软件包。
我找到了这个旧帖子,它似乎有效。
netsh interface tcp set global autotuninglevel=disabled