2016-07-22 14 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

相关问题