adb-export
Android · bash script · open source, Apache 2.0
Point it at a content URI and get a CSV. It runs adb shell content query on a
connected phone or emulator, turns the answer into a proper table and writes it next to the
raw output. Your own app's provider or any system one the shell user may read: contacts,
calendar, media, settings, SMS, call log.
What it does
- One file, no dependencies beyond bash, awk and adb. Runs on macOS and Linux as they come.
- Real CSV: commas, quotes and multi-line text in values survive, ready for Excel, Numbers or pandas.
- Column names are worked out from the data itself, so any provider works without telling it the schema.
- Filter, project and sort on the device with
--where,--projectionand--sort. - Finds adb on its own, picks the connected device or asks when there are several, and explains offline or unauthorized ones.
- A probe mode that tries sixty well known providers and tells you which ones this device will hand over.
- Write to a folder of your choice, or straight to stdout for a pipeline.
An export
The global settings table from an emulator, as it lands in data.csv. Values that
contain commas are quoted in the file and come through intact.
| _id | name | value | is_preserved_in_restore |
|---|---|---|---|
| 166 | carrier_app_names | com.google.android.apps.tycho:Google Fi | true |
| 115 | adb_wifi_enabled | 0 | false |
| 44 | low_battery_sound_timeout | 0 | false |
| 2 | airplane_mode_radios | cell,bluetooth,uwb,wifi,wimax | false |
| 36 | car_undock_sound | /product/media/audio/ui/Undock.ogg | false |
| 79 | wear_os_version_string | empty | false |
| 5 | airplane_mode_toggleable_radios | bluetooth,wifi | false |
| 83 | system_capabilities | 99 | false |
What will the device give you?
Android decides per provider what the shell user may read, and it changes between versions.
Rather than guess, --probe asks. Every URI gets a verdict: rows, empty, denied
or missing, with the reason when there is one.
Give it your own URIs and it tells you why something does not answer:
The built-in list was checked against an Android 16 emulator and a Pixel on Android 17. It is grouped like this, and the README has every URI with notes on what was removed over the years.
Getting it
You need adb from the Android platform-tools and a device with USB debugging on. Then one file:
More in the README: every option, how the parser works, and the full list of providers.
The story
Written by hand in 2015, then untouched for a decade. Revived in 2026 with an AI assistant: the parser was rewritten, tests were added, and the URI list was re-checked against current Android. Same idea, fewer surprises.