I need to view and query an sqlite database on a live device as I am having some issues. I am not sure if this is even possible. If so could you please point me in the right direction.
3 Answers
First you have to install USB driver of your phone in pc. You can get USB driver with your phone. May be its arrive with PC suite.
After install usb driver enable the USB debugging mode in your mobile phoen.
Then connect phone with pc & then open eclipse.
In eclipse open DDMS, after that select your device.
After that open File Explore.
In File explorer go to Data --> Data --> your application's package name under that you can get your database. You can pull out that database out of your location.
After pulling out database to your location open that database using SQLite Manager

- 15,274
- 8
- 31
- 41
If your device is rooted, you can access it directly via a adb shell
.
If not, it is not possible.
You can however connect your device via USB and enable USB debugging and check it that way around, but you will need to deploy the application again.

- 8,078
- 2
- 26
- 46
-
what exactly is the second approach you described? Is that via eclipse? The device is not rooted either – Somk Nov 21 '11 at 14:01
-
1it is how you normally would develop any application and deploy it to your phone. – Jan Dragsbaek Nov 21 '11 at 14:04
You can see it with sqlite browser. You need to copy it to your computer first. You can copy it programatically like this to sd card(and then with usb cable to your pc). You have to do this because you cannot access db file on a non-rooted device.
Backup and restore SQLite database to sdcard
It is simpler on a rooted phone, you can use adb pull
.