Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

location of .db file in different android phones

when we use sqlLite database for our projects does the path of .db file /data/data/com.yourpackage.name/databases. remains the same for each and every android phone?? or path of storage of .db file differ in android phones?

like image 805
Swapnil Kadam Avatar asked Jun 28 '12 13:06

Swapnil Kadam


People also ask

Where is the db file stored in Android?

Just like files that you save on the device's internal storage, Android stores your database in your app's private folder. Your data is secure, because by default this area is not accessible to other apps or the user. The SQLiteOpenHelper class contains a useful set of APIs for managing your database.

Where is .db file?

DB files are commonly saved in a SQLite database format, but they are also commonly locked or encrypted, so you cannot access or edit their data. One example DB file is sms. db, an iOS support file that stores your text messages. It is located in a device's /​private/​var/​mobile/​Library/​SMS/​ directory.


1 Answers

It does not matter. You find out the path for your app's database via getDatabasePath(), which will resolve to the correct spot for the particular device.

like image 147
CommonsWare Avatar answered Oct 28 '22 04:10

CommonsWare