| java.lang.Object | |
| ↳ | androidx.test.services.shellexecutor.ShellExecutorImpl |
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Execute a command with elevated permissions and return immediately.
| |||||||||||
Execute a command with elevated permissions and return immediately.
| |||||||||||
Execute a command with elevated permissions and block.
| |||||||||||
Execute a command with elevated permissions and block.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||||
|
| |||||||||||
| Parameters | |
|---|---|
context |
Context |
binderKey |
String |
Execute a command with elevated permissions and return immediately.
| Parameters | |
|---|---|
command |
String: The shell command to be executed. |
parameters |
List: A Map parameters to be given to the shell command |
shellEnv |
Map: A Map of shell environment variables to be set |
executeThroughShell |
boolean: If set to true, the command string will be executed through the
shell with parameters given as additional shell arguments. |
| Returns | |
|---|---|
InputStream |
InputStream representing the shell output of the command. |
| Throws | |
|---|---|
IOException |
|
RemoteException |
|
Execute a command with elevated permissions and return immediately.
| Parameters | |
|---|---|
command |
String: The shell command to be executed. |
parameters |
List: A Map parameters to be given to the shell command |
shellEnv |
Map: A Map of shell environment variables to be set |
executeThroughShell |
boolean: If set to true, the command string will be executed through the
shell with parameters given as additional shell arguments. |
timeoutMs |
long: Optional, destroys the executing subprocess if it runs longer than this
timeout. |
| Returns | |
|---|---|
InputStream |
InputStream representing the shell output of the command. |
| Throws | |
|---|---|
IOException |
|
RemoteException |
|
Execute a command with elevated permissions and block.
| Parameters | |
|---|---|
command |
String: The shell command to be executed. |
parameters |
List: A Map parameters to be given to the shell command |
shellEnv |
Map: A Map of shell environment variables to be set |
executeThroughShell |
boolean: If set to true, the command string will be executed through the
shell with parameters given as additional shell arguments. |
timeoutMs |
long: Optional, destroys the executing subprocess if it runs longer than this
timeout. |
| Returns | |
|---|---|
String |
String representing the contents of the shell output of the command. |
| Throws | |
|---|---|
IOException |
|
Execute a command with elevated permissions and block.
| Parameters | |
|---|---|
command |
String: The shell command to be executed. |
parameters |
List: A Map parameters to be given to the shell command |
shellEnv |
Map: A Map of shell environment variables to be set |
executeThroughShell |
boolean: If set to true, the command string will be executed through the
shell with parameters given as additional shell arguments. |
| Returns | |
|---|---|
String |
String representing the contents of the shell output of the command. |
| Throws | |
|---|---|
IOException |
|