ByteScope

getprop

read-only

Prints the system properties — the phone's own answer to what it is.

Command
adb shell getprop
Commands
System and logs
Risk
read-only

Syntax

getprop [-T | -Z] [<name> [<default>]]

Flags and arguments

TokenMeaning
<name>Print one property's value on its own, with no brackets around it. A second positional argument is the fallback: `getprop ro.nope missing` prints `missing`. Leave it out and the fallback is the empty string, so a misspelt property name prints a blank line and exits zero — the one failure of this command that looks exactly like success. `-T` and `-Z` swap the value for the property's type or its SELinux context, and they are mutually exclusive; both accept a name or list everything, and both need the property info file that the plain value form never touches.

Examples

  • getprop

    Everything. Over a thousand entries on a modern phone.

  • getprop ro.product.model

    One value, unadorned.

  • getprop ro.build.version.sdk

    The API level, which is the honest way to ask how old this Android is.

Reading the output

Sample output

[ro.product.model]: [Pixel 7]
[ro.build.version.sdk]: [34]

With no argument, one `[key]: [value]` line per property, sorted by key — `PrintAllProperties` collects every property, sorts the pairs and only then prints them, so the order on screen is the sort order and not the order the system set them in. A value can itself contain a closing bracket, so anchor on the `]: [` separator and the bracket that ends the line rather than splitting on brackets. With a name, the value is printed bare on one line, with no key, no brackets and no quoting — which is what makes `getprop ro.build.version.sdk` safe to compare against a number in a script, and also what makes an empty answer indistinguishable from an empty value.

Output fields

FieldMeaning
ro.product.modelMarketing model name.
ro.product.manufacturerWho made it.
ro.build.version.releaseThe Android version as a human sees it.
ro.build.version.sdkThe API level. The number worth branching on, if you must branch.
ro.build.fingerprintThe whole build identity in one string.
ro.serialnoThe serial number, where the build still exposes it.

What access it needs

No root, no `adb root`, and — unusually for this reference — no `system_server` either. `getprop` is a plain binary from the platform's own toolbox (`system/core/toolbox/getprop.cpp`), not a shell into a running service the way `pm` and `input` are, so it reads the shared property area directly and keeps answering while the device is still booting or while binder is wedged. That makes it the first thing worth running when a `dumpsys` or a `cmd` call has just told you it cannot find its service. Reading is all it does: there is no write form here, and changing a property is `setprop`, a different command with a different answer to the access question. What the `shell` user is allowed to see is decided per property by the platform, so this page does not claim any particular property will be there — the honest test is to ask for it and see.

Failure messages, decoded

MessageMeaning
getprop: Max 2 arguments (see "getprop --help")More than a name and a fallback arrived. Almost always the shell split an unquoted argument on a space before `getprop` ever saw it — quote the value, or check that a stray word did not survive from the line above.
Only one of -T or -Z may be specifiedBoth flags were passed. A property has a type and it has a context, but this command prints one column, so it refuses rather than picking for you. Run it twice.
Unable to load property info fileThe property info that `-T` and `-Z` are answered from could not be loaded, and `getprop` returns without printing. The plain value form does not read that file at all, so drop the flag and the values still come back.

Version and vendor notes

  • A duplicate key is possible; the last value printed is the effective one.
  • `ro.` properties are read-only after boot. Others can change while you watch, so two reads a minute apart can legitimately disagree.
  • Manufacturers add and remove properties freely. The absence of one is not evidence about the hardware.

We have a UI for this

Android ADB Toolbox runs this command over USB and parses what comes back — a Chromium browser, no SDK, nothing uploaded.

Open Android ADB Toolbox

Related commands

Commands that turn up in the same session as getprop.

CommandWhat it does
settings getReads one value out of the phone's settings provider.
dumpsys batteryThe battery service's live state: level, status, health, voltage and temperature.
topA one-shot process table: CPU share, memory, state and command line.

More System and logs commands

CommandWhat it does
logcatStreams the system log: the running commentary of everything happening on the phone.
run-asRuns a command as one app's own uid — the way to read a debug build's private files without root.

Running these commands, when they need root, why output differs between phones and running them from a browser are covered once in the adb shell command reference.