EmulatorCommandRequest

class EmulatorCommandRequest(cmd: String, val address: InetSocketAddress, authToken: String? = null, cleanResponse: Boolean = true, val idleTimeoutOverride: Long? = null)

This request is completely different to other requests: it connects directly to emulator instead of adb server For simplicity it can be used in the same way as adb server requests and shares the socket creation logic (and hence the coroutine context) with other requests

Parameters

cmd

use help to list all available commands, may be emulator-dependant

hostname

usually localhost since emulator port is binded to the loopback interface only

port

console port of the emulator. if your device is emulator-5554, port is 5554, emulator-5556 - 5556 and so on

authToken

authentication token is required for connecting to emulator. If null, will be read from $HOME/.emulator_console_auth_token. If you want to remove the auth completely - $HOME/.emulator_console_auth_token file should be empty

cleanResponse

by default all responses contain the emulator auth output that is unnecessary. If you want the output to include everything the emulator returns - set this to false

Constructors

Link copied to clipboard
constructor(cmd: String, address: InetSocketAddress, authToken: String? = null, cleanResponse: Boolean = true, idleTimeoutOverride: Long? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun process(socket: Socket): String

Properties

Link copied to clipboard
Link copied to clipboard