AndroidDevice

Represents an android device

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class Properties(val androidVersion: String, val brand: String, val manufacturer: String, val model: String, val name: String, val displayWidth: Pixels, val displayHeight: Pixels)

Wrapper class containing the basic properties of an android device

Functions

Link copied to clipboard

Controls whether or not to show the pointer info on screen

Link copied to clipboard
fun execute(vararg args: String): Process

Runs a command specifically on this device using "exec-out"

Link copied to clipboard
fun executeShell(vararg args: String): Process

Same as execute but uses "shell" instead of "exec-out", use this if there are input/output issues with execute

Link copied to clipboard

Checks if this device is still reachable by ADB

Link copied to clipboard

Checks if device is showing pointer information

Link copied to clipboard

Checks if device is showing touches

Link copied to clipboard
fun push(local: Path, remote: String): Boolean

Transfer a file to this device

Link copied to clipboard

This will close the current scrcpy process tied to this device and start a new instance

Link copied to clipboard
fun showTouches(display: Boolean)

Controls whether or not to show touches on screen

Link copied to clipboard

Toggles pointer info

Link copied to clipboard

Toggles show touches

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

Capture method to use

Link copied to clipboard

Compression of the captured image can reduce the amount of time it takes to copy it from the emulator to pc memory, therefore reducing latency. Only applicable when captureMethod is CaptureMethod.SCREENCAP

Link copied to clipboard
open override val input: AndroidInput
Link copied to clipboard

Orientation of the device

Link copied to clipboard

Properties of this android device

Link copied to clipboard

Reference to Scrcpy object tied to this device, providing services such as video and input

Link copied to clipboard
open override val screens: List<AndroidRegion>
Link copied to clipboard