Where is located an app SQLite database created by Room library on a device?
I have an app which create and use a Room database. To debug the database I would like to open it in a SQLite viewer app but I don’t know where the database is located on a testing device.
Whether you use Room, OrmLite or SQLite in Android all are located within databases folder of application package.
You can access the databases folder by following below steps.
- View > Tool Windows > Device File Explorer
From Device File Explorer go to data folder in which all the application packages are stored. Make sure that Emulator or device is connected.
- data > data
Then, find you application package and go to your database.
- com.company.my > databases > yourdatabasename.db
You can then save your database in your computer and do anything you want with it.
I use SQLiteBrowser to browse the database.
Answered By – musooff