int executePath(String, String, boolean, int)
Executes a file path or shell script as a string
Security
Trust Level Required: Full trust
Parameters
Name | Description |
path |
String The full path of the command to run |
args |
String The command line arguments to pass to the script file |
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.