Debugging my Android app and I need to inspect its SQLite database, both on a real device and in the emulator. What is the current sane workflow for pulling and viewing these?
How to access and view an Android SQLite database?
Solved SQL & Databases
BA
Barry Allen October 24, 2019
2 replies
5,780 views
Reviewed by moderators
Depends where the app runs:
1
Debuggable app or emulator: Android Studio's Database Inspector (View, Tool Windows, App Inspection) shows live tables with edit support. No file pulling at all.
2
Need the file itself:
adb exec-out run-as your.package cat databases/app.db > app.db pulls it from a debuggable app without root.3
Open the pulled file in DB Browser for SQLite, or in SysTools SQLite Viewer if the file is damaged or you also want deleted-record visibility.
Database Inspector covers 90 percent and the adb pull handles the rest. Workflow sorted. Solved.