Padmal
Padmal

Reputation: 478

Where is the SQLite datase file?

I've created an app using Android Studio and it has a database file handler. I've gone through a few post and everywhere they are saying go to data\data\ folder to get the app folder. But mine doesn't show any folder for my app. Do I have to manually set this file location to be created? How can I find my database.db file?

Upvotes: 0

Views: 126

Answers (3)

Kenneth
Kenneth

Reputation: 4065

It should be automatically placed in data/data/databases in your app folder unless you specify otherwise. Are you sure it is created?

That is /data/data/package-name/databases/dbfilename

I have another suggestion. If you have enabled backup for your application, you might be able to use ADB BACKUP, like suggested here: http://blog.shvetsov.com/2012/09/backup-your-android-without-root-or.html

Upvotes: 2

Rohit Jagtap
Rohit Jagtap

Reputation: 1670

You can access the .db file only on emulator, its not possible on actual device. In the android studio open the DDMS perspective, there on the left hand side you will find the storage structure, there in data/data/ you will get the file you are looking for

Upvotes: 0

coding
coding

Reputation: 71

The database files are located in the following folders.

/data/data/packagename/databases/

Upvotes: 0

Related Questions