2

I have installed my application on my device and would like to know how to pull the database off the device to view it.

Also how do I encrypt the database?

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
user581431
  • 57
  • 6
  • Try this... http://stackoverflow.com/questions/4721732/sqlite-example-program-in-android – Noby Nov 09 '11 at 07:30

1 Answers1

0

You can use DDMS to pull any file off of an emulator. If you are using a physical device you will need root access to get the database file off of the device because the data folder is protected.

I use SQLite Database Browser to view the database once I get the file off the device.

Austyn Mahoney
  • 11,398
  • 8
  • 64
  • 85
  • Thanks for the information, but I want to pull database from Physical Device I dont know how to get ROOT access of device – user581431 Nov 09 '11 at 08:20
  • There is only one way to pull a database off of a physical device without root access, and that is using code inside the application that created it. Only the application that created the database can access the file location where it is stored. This is because of Android's application sandbox security model. You could place some code inside your application to move the database file to the SD card, but I would suggest installing the app on an emulator and use that to grab the database file. – Austyn Mahoney Nov 09 '11 at 08:27
  • OK, but can you help me how to get ROOT access of device – user581431 Nov 09 '11 at 08:28
  • I have edited my last comment. Rooting your device is off topic here on SO. If you really really want to do that, please check Android Enthusiasts (http://android.stackexchange.com/). – Austyn Mahoney Nov 09 '11 at 08:31
  • Ok, Thanks a lot for your precious suggestions...keep in touch – user581431 Nov 09 '11 at 09:11