adb-export

Android · bash script · open source, Apache 2.0

./adb-export.sh content://settings/global Exporting content://settings/global from emulator-5554 - Columns (4): _id, name, value, is_preserved_in_restore Rows exported: 189 Elapsed: 1s Raw output: ./exports/settings_global-20260907-232348/raw_query.txt CSV: ./exports/settings_global-20260907-232348/data.csv

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.

View on GitHub

What it does


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.

data.csv · exports/settings_global-20260907-232348189 rows · 4 columns
_idnamevalueis_preserved_in_restore
166carrier_app_namescom.google.android.apps.tycho:Google Fitrue
115adb_wifi_enabled0false
44low_battery_sound_timeout0false
2airplane_mode_radioscell,bluetooth,uwb,wifi,wimaxfalse
36car_undock_sound/product/media/audio/ui/Undock.oggfalse
79wear_os_version_stringemptyfalse
5airplane_mode_toggleable_radiosbluetooth,wififalse
83system_capabilities99false
181 more rows
head -4 exports/settings_global-20260907-232348/data.csv _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 2,airplane_mode_radios,"cell,bluetooth,uwb,wifi,wimax",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.

./adb-export.sh --probe Probing 62 content URIs on 57221FDCH009VC Calendar rows 3 content://com.android.calendar/calendars rows 243 content://com.android.calendar/events empty content://com.android.calendar/reminders rows 35 content://com.android.calendar/colors Contacts empty content://com.android.contacts/contacts rows 5 content://com.android.contacts/groups rows 1 content://com.android.contacts/profile Media rows 45 content://media/external/file rows 24 content://media/external/images/media empty content://media/external/audio/media Settings rows 44 content://settings/system rows 217 content://settings/secure rows 260 content://settings/global Telephony empty content://sms empty content://call_log/calls rows: 23 empty: 39 denied: 0 missing: 0 error: 0

Give it your own URIs and it tells you why something does not answer:

./adb-export.sh --probe content://settings/bookmarks content://telephony/siminfo Probing 2 content URIs on emulator-5554 missing content://settings/bookmarks (Bad root path: bookmarks) denied content://telephony/siminfo (Access SIMINFO table from not phone/system UID) rows: 0 empty: 0 denied: 1 missing: 1 error: 0

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.

Calendar11 tables
Contacts18 tables
Media11 tables
Settings3 tables
Telephony17 tables
Otherdownloads, dictionary

Getting it

You need adb from the Android platform-tools and a device with USB debugging on. Then one file:

curl -O https://raw.githubusercontent.com/sromku/adb-export/master/adb-export.sh chmod +x adb-export.sh ./adb-export.sh content://com.android.contacts/contacts

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.