Skip to main content
Version: 0.0.24

getProp

Shorthand for getprop executable.

declare class Adb {
getProp(key: string): Promise<string>;
}

It will trim the last newline character from the output.

Examples

Get Android OS version

const version = await adb.getProp("ro.build.version.release");
Equivalent ADB Command
adb shell getprop ro.build.version.release

Get ADB over Wi-Fi listen port

const port = await this.adb.getProp("service.adb.tcp.port");
Equivalent ADB Command
adb shell getprop service.adb.tcp.port

The tcpip command provides a more reliable way to get and set ADB over Wi-Fi settings.