盒子默认开启了udp adbd,请教连接方法
本帖最后由 智能小柠檬 于 2024-3-8 17:38 编辑通过对比发现魔百和盒子开启了udp的adbd,端口是9999。
127|console:/ # netstat -na
Active Internet connections (established and servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 ::ffff:192.168.2.:38520 :::* LISTEN
tcp6 0 0 :::5566 :::* LISTEN
udp 0 0 0.0.0.0:9999 0.0.0.0:*
udp6 0 0 ::ffff:192.168.2.:40143 :::*
udp6 0 0 :::1900 :::*
Active UNIX domain sockets (established and servers)
Proto RefCnt Flags Type State I-Node Path
unix2 [ ACC ] STREAM LISTENING 12657 /dev/socket/zygote
unix2 [ ACC ] STREAM LISTENING 12917 /dev/socket/logd
unix2 [ ACC ] SEQPACKETLISTENING 12922 /dev/socket/logdr
unix76 [ ] DGRAM 12925 /dev/socket/logdw
unix2 [ ] STREAM 31870 /dev/socket/adbd
console:/ # stop adbd
console:/ # netstat -na|more
Active Internet connections (established and servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 ::ffff:192.168.2.:38520 :::* LISTEN
tcp6 0 0 :::5566 :::* LISTEN
udp6 0 0 ::ffff:192.168.2.:40143 :::*
udp6 0 0 :::1900 :::*
说明:udp 9999 是adbd开启的端口,好像adb一般都是tcp服务,不知为何这个盒子是用udp启用服务。我尝试用adb connect x.x.x.x:9999 连接不上,不知道如何连接udp的adbd,请群内高手指点一下,谢谢!
这个?https://www.znds.com/tv-1186230-1-1.html dafsdafwe 发表于 2024-3-8 17:38
这个?https://www.znds.com/tv-1186230-1-1.html
我的盒子adbd服务默认已经开了,但是不是 tcp 协议的 adbd,而是 udp 协议的 adbd 。客户端adb connect 无法连接。不知道udp adb要如何连接? 换个思路搞定了tcp服务。
udp 连接找不到资料,查了系统的配置文件也没找到udp改tcp的设置,想到换个adbd程序试试,于是从已有固件中复制一个到系统中,久违的默认协议和端口号tcp 5555居然出现了。
相同版本,系统自带的adbd文件较小,显然被阉割了。
console:/ $ adbd --v
Android Debug Bridge Daemon version 1.0.40
console:/ $ ls -l /system/bin |more
total 29972
-rwxr-xr-x 1 root shell 1272308 2024-03-09 10:21 adbd
-rwxr-xr-x 1 root shell 1053080 2009-01-01 00:00 adbd.ori
重启服务后开启了tcp 5555 adbd服务
console:/ $
console:/ $ netstat -na|more
Active Internet connections (established and servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 0 :::5555 :::* LISTEN
Active UNIX domain sockets (established and servers)
Proto RefCnt Flags Type State I-Node Path
unix2 [ ACC ] STREAM LISTENING 15725 /dev/socket/adbd
页:
[1]