views:

57

answers:

1

I've tried to view the db file from the File Explorer in Eclipse but I can't open the file or copy it to another location to open. I don't have a rooted phone so I was trying to view the db from the app on my emulator. If someone could help it would be greatly appreciated as I find it hard to find much info on this subject for some reason. Thanks!

+3  A: 

what do you want to see? Is it your application's data stored in database? If that is the case then you can see the data from android's shell. Follow commands mentioned below.

adb shell

sqlite3 sample-database.db

Check these links for more details.

  1. http://stackoverflow.com/questions/3415702/opening-sqlite-db-on-command-prompt/3415837#3415837
  2. http://vinnysoft.blogspot.com/2009/09/creating-databases-from-sqlite-shell.html
Tushar Tarkas
Thanks that worked after going to /data/data/myappfolder/databases/. I've used .tables and can see my table "Locations" but how do I have it list all the stuff in that table? Thanks!
fwaokda
normal SQL select query works with it. Refer http://www.screaming-penguin.com/node/7742 for learning basics of using Sqlite3 with Android.
Tushar Tarkas
Thanks, I guess my table is empty because after doing "select * from Locations;" it just goes to the next shell line. :)
fwaokda