2016-07-22 12 views

回答

0

對於執行shell命令,您不需要Terminal Emulator App。 Android基於Linux內核,因此您可以直接執行shell命令。

試試這個代碼,

// Command to execute 
String command = "date"; 
ShellExecuter exe = new ShellExecuter(); 
String outp = exe.Executer(command); 
out.setText(outp); 
Log.d("Output", outp); 
+0

所有命令不以這種方式工作。像: 「wpa_cli」。 – user6623795

相關問題