getprop
read-onlyPrints 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
| Token | Meaning |
|---|---|
| <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
getpropEverything. Over a thousand entries on a modern phone.
getprop ro.product.modelOne value, unadorned.
getprop ro.build.version.sdkThe 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
| Field | Meaning |
|---|---|
| ro.product.model | Marketing model name. |
| ro.product.manufacturer | Who made it. |
| ro.build.version.release | The Android version as a human sees it. |
| ro.build.version.sdk | The API level. The number worth branching on, if you must branch. |
| ro.build.fingerprint | The whole build identity in one string. |
| ro.serialno | The 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
| Message | Meaning |
|---|---|
| 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 specified | Both 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 file | The 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.
Related commands
Commands that turn up in the same session as getprop.
| Command | What it does |
|---|---|
| settings get | Reads one value out of the phone's settings provider. |
| dumpsys battery | The battery service's live state: level, status, health, voltage and temperature. |
| top | A one-shot process table: CPU share, memory, state and command line. |
More System and logs commands
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.