0

I have been trying to pull out my SQLite database from my android application onto my computer.
I only get results, when I run my application on the eclipse android emulator and then I can access to the DB. But the thing is using the emulator is to slow and it doesn't have all the data I have been storing on my app on the cellphone.
I have been googling that for a day and all I can see is "use the emulator".

Isn't it possible without the emulator ?

Nickolaus
  • 4,785
  • 4
  • 38
  • 60
Karly
  • 389
  • 2
  • 7
  • 25

2 Answers2

2

On commercially released Android devices, you aren't allowed access to your app's internal SQLite database (for security reasons). Thus, if you simply can't stand the emulator, or if you just want to test your app on an actual device to make sure it works properly, there are two options to consider.

  1. Root your device. This will give you access to the /data folder where your app's internal SQLite database is stored.
  2. Use a 3rd party library to write the contents of your database to the SD card. This is a nice workaround if you don't want to bother rooting your device. Check this post for one such implementation.
Community
  • 1
  • 1
Alex Lockwood
  • 83,063
  • 39
  • 206
  • 250
1

The SQLite database in your app is just a file. You can use the DDMS file view in Eclipse to pull the file off your device, but only if you have a rooted or development device, or if you're using the emulator.

Once youve got the file on your computer you'll be able to run queries against it using the sqlite3 command (which, depending on your system, you may have to install).

Alex Lockwood
  • 83,063
  • 39
  • 206
  • 250
kwood
  • 166
  • 4