int execute(String, boolean, int)
Executes a UNIX command
Security
Trust Level Required: Full trust
Parameters
Name | Description |
cmdLine |
String The UNIX command to be executed |
asRoot |
boolean True to run command as root user, false otherwise |
timeoutMs |
int Time in milliseconds before the command terminates and calls onCommandTerminated. |
Remarks
A device must be rooted to run a script command as a root user. onCommandCompleted is called after the command executes. If 0 is used as the timeout, then the command will timeout after 20 seconds.
Return
The ID number of the command. The first call to execute after page load will return as 0, then 1, etc.