Wolf_85
Wolf_85

Reputation: 43

How can I find my SQLite database file on my computer?

I implemented my first app using Xamarin Studio (Mono for Android). This app stores some data in a SQLite db, which works fine on a Sony Tablet S device.

My question is: is there a way to get db file and see, for example, its size?

I looked up to the following path

/data/data/My-Application-Package-Name/databases/My-database-name

but it doesn't seem to exist.

Thanks for any help!

Upvotes: 4

Views: 10649

Answers (2)

Dave
Dave

Reputation: 298

You can use Eclipse to go right to it using the sqlite manager plug-in (http://www.coderzheaven.com/2011/04/18/sqlitemanager-plugin-for-eclipse/)

  • Download the *.jar file from the website I reference above to the "dropins" folder in eclipse (open your eclipse folder and you should see it)
  • Then restart eclipse and go to the DDMS. You may have to do windows->views-ddms if it isn't already being displayed...
  • Select your device from the left panel then use the file explorer to go to your data
    directory/YOURAPP/databases. Hopefully there will be an icon that
    shows up when you select your database. If not, rename your database to use the "db" ext.
  • Click it and it should open in the manager tab.

Upvotes: 2

fenix
fenix

Reputation: 1746

This is a valid database location (//data/data/My-Application-Package-Name/databases/My-database-name), but you can access it from file managers if you have root access only. Look how it can be done here. Otherwise, if you want to get some info trough the code, you're doing something wrong, so publish the code and logcat.

Upvotes: 0

Related Questions