public class RootShell
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
RootShell.RootShellException |
Constructor and Description |
---|
RootShell(android.content.Context context) |
Modifier and Type | Method and Description |
---|---|
int |
run(java.util.Collection<java.lang.String> output,
java.lang.String command)
Run a command in a root shell.
|
void |
start() |
void |
stop() |
public int run(@Nullable java.util.Collection<java.lang.String> output, java.lang.String command) throws java.io.IOException, RootShell.RootShellException
output
- Lines read from stdout are appended to this list. Pass null if the
output from the shell is not important.command
- Command to run as root.java.io.IOException
RootShell.RootShellException
public void start() throws java.io.IOException, RootShell.RootShellException
java.io.IOException
RootShell.RootShellException
public void stop()