Is it possible to run a script passing through Terminal emulator ?
Is it possible to run a script passing through Terminal emulator ?
I just want to run :
su
Menu
TrianguloY
]]>
< ![CDATA[
http://stackoverflow.com/a/6882295/4388512
]]>
< ![CDATA[
Lukas Morawietz replaced the array by the only one command : menu
And I receive an error on line 1, midsing ;
public void
RunAsRoot(“menu” cmds){ Process p = Runtime.getRuntime().exec(“su”);
DataOutputStream os = new DataOutputStream(p.getOutputStream());
for (String tmpCmd : cmds) { os.writeBytes(tmpCmd+”\n”); } os.writeBytes(“exit\n”); os.flush();
}
]]>
< ![CDATA[
Lukas Morawietz is the error with copy/paste ?
]]>
< ![CDATA[
yes. you have to translate it to javascript.
]]>