When I have created the sqlite database directly from my application. I am not getting where the database actually stored with application
Then I found that the system stores databases in the /data/data/package_name/databases folder by default.
To access that database We can use adb
Android Debug Bridge (adb) is a versatile tool lets you manage the state of an emulator instance or Android-powered device
- adb -s emulator-5554 shell
adb -s <serialNumber> <command>
- sqlite3 /data/data/package_name/databases/database_name
Now you can access sqlite promt
sqlite> .databases
which display
seq name file
--- --------------- ----------------------------------------------------------
1 main data/data/package_name/databases/databasename
--- --------------- ----------------------------------------------------------
1 main data/data/package_name/databases/databasename
Comments
I am new in Android Development.
Please explain me how to connect database in android.
Thanks in Advance