I'm trying to create a script to simplify data checking with sqlite. For me it's quite troublesome to write :
adb shell
sqlite /data/data/my.package.name/databases/mydatabse.db
every time I want to check something in the db (and in the beginning phases of db development this is quite often), especially because TAB completion doesn't seem to work (at least for me). So I tried to write a script to automatically open the database for me, but the android documentation clearly states that:
shell [<shellCommand>] - Issues a shell command in the target emulator/device
instance and then exits the remote shell.
So I was wondering whether there would be some way around that, so that my shell would remain running and I could use the sqlite3 command-line program. With a bit of help from here I was able to create scripts that run specific database queries, like so (but I'd like to keep the sqlite command-line program running):
#!/bin/bash
adb shell sqlite3 /data/data/my.package.name/databases/mydatabse.db "select * from someTable"
Thanks in advance!