Android:不带/ system / bin / ping的ping
作者:互联网
在某些设备上,似乎已删除二进制文件/ system / bin / ping.
当我通过USB连接设备并键入
adb shell ping
它说:
/system/bin/sh: ping: not found
是否仍然可以从此类设备发送ping请求?
还有其他其他方法来确定服务器是否可访问或数据包是否丢失?
解决方法:
InetAddress.isReachable()大约是多少?文件:
Tries to reach this InetAddress. This method first tries to use ICMP
(ICMP ECHO REQUEST), falling back to a TCP connection on port 7 (Echo)
of the remote host.
标签:reachability,ping,android 来源: https://codeday.me/bug/20191029/1963817.html