object Shell


Allows to execute commands. This class builds on top of ShellProcess and abstracts the shell streams to focus on the output of a single command execution. A ShellProcess is created for each executed command, using the given factory shellProcessFactoryBlock.

Summary

Nested types

The output of a shell command executed via Shell.command.

Public functions

ApplicationCommands
application(packageName: String)

Commands for application.

Shell.CommandOutput
command(command: String)

Executes a given command and returns the ongoing CommandOutput.

PermissionCommands
permission(packageName: String)

Commands for permissions.

ProcessCommands

Commands for processes.

RecorderCommands

Commands for screen recorder.

ScreenCommands

Commands for screen.

Unit

Allows configuring the underlying ShellProcess utilized to execute the commands.

WifiCommands

Commands for wifi.

Public functions

application

Added in 1.0.0-alpha01
fun application(packageName: String): ApplicationCommands

Commands for application.

command

Added in 1.0.0-alpha01
fun command(command: String): Shell.CommandOutput

Executes a given command and returns the ongoing CommandOutput.

permission

Added in 1.0.0-alpha01
fun permission(packageName: String): PermissionCommands

Commands for permissions.

process

Added in 1.0.0-alpha01
fun process(): ProcessCommands

Commands for processes.

recorder

Added in 1.0.0-alpha01
fun recorder(): RecorderCommands

Commands for screen recorder.

screen

Added in 1.0.0-alpha01
fun screen(): ScreenCommands

Commands for screen.

setShellProcessFactory

Added in 1.0.0-alpha01
fun setShellProcessFactory(factory: () -> ShellProcess): Unit

Allows configuring the underlying ShellProcess utilized to execute the commands.

wifi

Added in 1.0.0-alpha01
fun wifi(): WifiCommands

Commands for wifi.