Sqlite3 & Shell command

383 views
Skip to first unread message

Soli Engineer

unread,
Jan 11, 2013, 2:22:57 AM1/11/13
to tas...@googlegroups.com
Can we use Sqlite3 command in an unrooted android phone?
is it necessary to root my phone to use any shell command?

Wietse van Buitenen

unread,
Jan 11, 2013, 7:51:45 AM1/11/13
to tas...@googlegroups.com
I think you can use sqlite3 without root but if you need to access the databases of different apps you will probably need to root it..
cant say for sure though as all phones around me are rooted :)

Soli Engineer

unread,
Jan 11, 2013, 8:01:23 AM1/11/13
to tas...@googlegroups.com

Thanks Wietse
But I just can't run a select statement from a db through a shell :(
I have a simple table with phone no. And name. I want talker to pull put the name from the incoming call/sms. I purchased the sqlite (not sqlite3)
But not working. Looking for help
Thanks again

GermainZ

unread,
Jan 11, 2013, 10:36:50 AM1/11/13
to tas...@googlegroups.com
Run Shell:
sqlite3 /path/to/file.db "SELECT column FROM table WHERE column='value';"
If the file.db is not on your SD card, use root.
On some devices such as mine, sqlite3 doesn't function correctly. Use /system/xbin/sqlite3 instead if that's the case.

Use a terminal emulator first (or adb).
If using adb:
adb shell "sqlite3 /path/to/file.db \"SELECT column FROM table WHERE column='value';\""
might work. Not sure.

You don't have to purchase anything. You probably bought SQLite Editor, which is a stand alone app. sqlite3 is an included library that comes with Android.

Wietse van Buitenen

unread,
Jan 11, 2013, 10:45:39 AM1/11/13
to tas...@googlegroups.com
this is also what I do, without any purchased extras :)

should you not be able to call sqlite3 without root, you could always extract the sqlite3 binary from any CyanogenMod ROM, copy that binary to your sdcard and try to call that..
Reply all
Reply to author
Forward
0 new messages