0
假設這樣的:植根手機上執行的進程與參數無效
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec(SU);
DataOutputStream processStream = new DataOutputStream(process.getOutputStream());
processStream.writeChars("cat /qwerty");
processStream.writeChars(EXIT);
processStream.flush();
int status = process.waitFor();
Log.d("EXIT STATUS", String.valueOf(status));
process.waitFor();
導致當前線程等待永遠。我想問題在於那個無效的命令(我故意這麼做)。但我該如何處理這種情況呢?
Busybox的1.17.1
謝謝,我的錯。 –