Advanced & Automation
Android 1.0+
Risk: READ_ONLY
Query Android Content Provider
Queries data directly from an Android ContentProvider URI using SQL-like syntax.
Command Syntax
adb shell content query
Generic Syntax:
content query --uri <URI> [--projection <PROJECTION>] [--where <WHERE>] [--sort <SORT>]
Options & Parameters
| Flag | Description |
|---|---|
| --uri <URI> | Content Provider URI (content://...). |
| --projection <COLS> | Colon-separated column list. |
| --where <SQL> | SQL WHERE filter expression. |
Real-World Usage Examples
Query MediaStore images
Queries photos database.
adb shell content query --uri content://media/external/images/media --projection _id:_data:date_added
Output:
Row: 0 _id=102, _data=/storage/emulated/0/DCIM/Camera/IMG_01.jpg, date_added=1724581200