I am creating an Android application and in that application I created one DB.
I'm querying the values in the DB and its working fine.
I need to know where the SQLite DB is stored in my system.
Can you give me the path, please?
Thank you!
I am creating an Android application and in that application I created one DB.
I'm querying the values in the DB and its working fine.
I need to know where the SQLite DB is stored in my system.
Can you give me the path, please?
Thank you!
By default, the sqlite database will be in the following directory:
/data/data/YOUR_APP_NAMESPACE/databases/YOUR_DB_NAME.db
So for example, the actual database that holds SMS messages in your phone is:
/data/data/com.android.providers.telephony/databases/mmssms.db
In the emulator you can access these files directly; when connecting to a real phone however you will need root access to access the db files directly.
The android doc gives you a quick overview: http://developer.android.com/intl/de/guide/developing/tools/adb.html
"All databases, SQLite and others, are stored on the device in /data/data/package_name/databases." here
You can use android File Explorer to view/pull the file from device.
1) Have you specified any path while you create/open the database.
In my case, I have used SQLiteDatabase.openOrCreateDatabase to create database and it requires the database path as first param.
SQLiteDatabase sqldb = SQLiteDatabase.openOrCreateDatabase(DATABASE_PATH+DATABASE_NAME, null);
2) If you are using something like this
openOrCreateDatabase("test.db", this.MODE_APPEND, null);
Your database will be at /data/data/package_name/databases
for accessing your database.if your are not able to find data/data/etc..
then go to eclipse select Window>open Perespective> other >DDMS and then find data/data/package/databases/your db