First export the database legally and safely
SQLite Viewer opens a file that you already possess; it does not extract databases from a phone. Use Android Studio’s Device Explorer, an emulator, an application backup or your own debug tooling to obtain a database you are authorized to inspect.
Android app databases commonly appear under an application-specific databases directory and may use .db or no extension. If the browser picker does not show an extensionless copy, rename the exported file to end in .db.
Open and inspect the app schema
- Drop the exported database onto SQLite Viewer.
- Search the table sidebar for the feature you are debugging.
- Open likely tables and inspect recent rows.
- Use the ER diagram to understand foreign keys and Room-style relationships.
- Run focused SQL instead of scrolling through large event or cache tables.
SELECT * FROM "sync_queue" ORDER BY "created_at" DESC LIMIT 0, 100;
View a debug app database live over USB
In Chrome or Edge on desktop, choose Android in the toolbar, connect your phone with USB debugging enabled and pick one of your debuggable apps. SQLite Viewer copies the database with run-as, merges the write-ahead log so recent writes are included, and can refresh it every few seconds while you test. Everything stays in your browser. Release builds are protected by Android and cannot be read this way.
Android Studio keeps the USB connection busy, so the viewer also has an ADB server mode: on Windows, download the one-click bridge installer and double-click it once. It sets up a small helper that starts by itself at every sign-in, and the page shares the ADB server with Android Studio so both work at the same time. On macOS and Linux, run the adb-bridge.py helper instead. The page detects the bridge automatically. Full help: ADB bridge setup guide.
Want to change data without restarting the app? Add a small debug-only helper and follow the live edit setup guide.
Handle WAL databases correctly
SQLite may use write-ahead logging, producing -wal and -shm companion files. Copying only the main database while the app is writing can omit recent transactions. Prefer a consistent export created while the database is closed or checkpointed.
Editing Android databases
You can edit a copy and download it, but replacing an app database can violate schema expectations or corrupt application state. Keep the original, validate constraints and use supported migration or debug tooling whenever possible.