0
이 코드를 사용하여 textView에서 만든 규칙을 표시하려고합니다.iptables 안드로이드의 textView에 규칙이 표시됩니다.
..................................
public void show(View btn) throws IOException{
Show(tv);
}
public final void Show(TextView tv) throws IOException{
Process Q =Runtime.getRuntime().exec("su -c iptables -L INPUT 1 -n -v --line-numbers ");
String pingResult="";
BufferedReader in = new BufferedReader(new
InputStreamReader(Q.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
tv.setText(pingResult+="\n"+inputLine+"\n");
}
in.close();
}
}
문제는 그것이 그 수퍼 유저 권한이 부여되었음을 알려주지 만, BufferReader ..... help를 사용했지만 테이블이 TextView에 나타나지 않습니까?