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.

Checked against AOSP, toybox and kernel sources while writing the parsers behind our Web ADB tools. Where a behaviour genuinely varies by Android version or manufacturer, this page says so instead of giving a number that would be wrong on half the phones out there.

Frequently asked questions

How do I run an adb shell command?

Switch on developer options and USB debugging on the phone, plug it in, then run adb shell <command> from a machine with platform-tools installed — or run adb shell on its own to get an interactive prompt and type the command without the prefix. If the command produces binary output, such as a screenshot, use adb exec-out instead of adb shell: the plain shell service attaches a terminal, which rewrites newline bytes and corrupts the data.

Do adb shell commands need root?

Not the ones on this reference. They run as the shell user, which can manage packages for its own Android user, read most dumpsys services, write the settings provider, inject input and read shared storage. Root is only needed for things this reference deliberately avoids — reading another app's private data (except through run-as on a debuggable build), writing system partitions, or reading /data/anr directly.

Why does the output look different on my phone?

Either the Android version or the manufacturer. Some flags and fields arrived in a specific release, and those are noted per command. The rest is OEM patching, which hits dumpsys hardest: a dump is debug output whose text is whatever the service author last printed, and manufacturers change it and backport their changes. Read fields by name rather than by position, and treat an unfamiliar shape as a difference rather than as a failure.

Can I run this from a browser instead of a terminal?

For many commands, yes — the Web ADB tools on this site talk to a phone over WebUSB from a Chromium-based desktop browser, with no SDK installed and nothing uploaded. Each page links to the tool that runs its command, when one exists. Two limits are worth knowing: only one program can hold the ADB interface at a time, so a desktop adb server has to be stopped first, and adb forward and adb reverse cannot work in a browser at all.

Would rather click than type? The Web ADB Toolkit runs commands like this from a browser over USB. Or browse every command.