开发者

traceroute command not working in android

开发者 https://www.devze.com 2023-03-18 19:39 出处:网络
I am trying to execute traceroute command following way: Runtime r = Runtime.getRuntime(); Process p = r.exec(\"traceroutegoogle.com\");

I am trying to execute traceroute command following way:

Runtime r = Runtime.getRuntime();
Process p = r.exec("traceroute  google.com");
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
while ((inputLine = in.readLine()) !=开发者_Python百科 null) {
            Log.d(tag,inputLine);
}

But it is giving me the following error:

java.io.IOException: Error running exec().

Commands: [traceroute, 202.164.36.66]

Working Directory: null

Environment: null

It works fine for ping or any other command of linux, please help.


There is no Traceroute installed on the device, so this will not work.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号