views:

180

answers:

1
# sqlite3 /data/data/com.moodme.android/databases/moodme
sqlite3 /data/data/com.moodme.android/databases/moodme
sqlite3: not found
+1  A: 

On the Android emulator, sqlite3 is in /system/xbin. There is no /system/xbin on a Nexus One (Android 2.2). Hence, I suspect that sqlite3 is not installed on the Nexus One.

CommonsWare
If you install cyanogenmod it has sqlite3 working in the shell.
schwiz
But doesn't device need it to create and read sqlite3 databases? Also, if it's not on the Nexus One, is there a way to get it on there?
Julian
@Julian: "But doesn't device need it to create and read sqlite3 databases?" -- Why would it? SQLite is a library, attached to an Android app via JNI. `sqlite3` is a command-line executable. "Also, if it's not on the Nexus One, is there a way to get it on there?" -- you're welcome to try to find an ARM port and see if you can get it working. I'm dubious that it's really the solution for whatever problem you think you have, though. Android apps don't need it. For development, you can pull the database off your rooted phone and examine it on your development machine.
CommonsWare
Ah. Ok. Thanks for explaining. There wasn't really a problem as such. I was just exploring whether it was necessary to always have to "pull' the database to examine it.
Julian
@Julian: On the emulator, no. On a device, yes, rooted or not. Also, if you're an Eclipse user, you might want to peek at MOTODEV Studio for Android. I seem to recall they had an integrated SQLite editor for on-emulator databases, and that might work with your rooted phone. Behind the scenes, it probably just does a pull, but it might be more convenient.
CommonsWare
@CommonsWare: Right on. Thanks.
Julian