{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ShellExecutorImpl

class ShellExecutorImpl : ShellExecutor


Summary

Public constructors

ShellExecutorImpl(context: Context!, binderKey: String!)

Public functions

InputStream!
executeShellCommand(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean,
    timeoutMs: Long
)

Execute a command with elevated permissions and return immediately.

InputStream!
executeShellCommand(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean
)

Execute a command with elevated permissions and return immediately.

String!
executeShellCommandSync(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean,
    timeoutMs: Long
)

Execute a command with elevated permissions and block.

String!
executeShellCommandSync(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean
)

Execute a command with elevated permissions and block.

String!

Public constructors

ShellExecutorImpl

ShellExecutorImpl(context: Context!, binderKey: String!)

Public functions

executeShellCommand

fun executeShellCommand(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean,
    timeoutMs: Long
): InputStream!

Execute a command with elevated permissions and return immediately.

Throws
java.io.IOException: java.io.IOException

executeShellCommand

fun executeShellCommand(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean
): InputStream!

Execute a command with elevated permissions and return immediately.

Throws
java.io.IOException: java.io.IOException

executeShellCommandSync

fun executeShellCommandSync(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean,
    timeoutMs: Long
): String!

Execute a command with elevated permissions and block.

Throws
java.io.IOException: java.io.IOException

executeShellCommandSync

fun executeShellCommandSync(
    command: String!,
    parameters: (Mutable)List<String!>!,
    shellEnv: (Mutable)Map<String!, String!>!,
    executeThroughShell: Boolean
): String!

Execute a command with elevated permissions and block.

Throws
java.io.IOException: java.io.IOException

getBinderKey

fun getBinderKey(): String!