1
申請流程需要的tcpdump試圖採取tcpdump的從應用程序或從code.i我用下面的代碼產生java.io.IOException:寫失敗:EPIPE(管道中斷),而針對Android
try {
Process process = Runtime.getRuntime().exec(
"su");
DataOutputStream os = new DataOutputStream(
process.getOutputStream());
os = new DataOutputStream(process.getOutputStream());
os.writeBytes("/data/local/tcpdump-arm -c 10 -s 0 -w /data/local/out.txt\n");
os.writeBytes("exit\n");
os.flush();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
,但得到的例外java.io.IOException:寫入失敗:在os.writeBytes(「/ data/local/tcpdump-arm -c 10 -s 0 -w /data/local/out.txt\n」)上的EPIPE(Broken pipe)請幫助..