Link Search Menu Expand Document

Retrieving device properties (equivalent to executing getprop on the device) can be done using the requests below.

Get all device properties

This requests retrieves all properties and create a Map of String -> String to allow working with properties like this properties["sys.boot_completed"].

val properties: Map<String, String> = adb.execute(
    request = GetPropRequest(),
    serial = "emulator-5554" 
)

Get single device property

If only a single property is needed then you can use the shorter version:

val value: String = adb.execute(
    request = GetSinglePropRequest(name = "sys.boot_completed"),
    serial = "emulator-5554" 
)