Philip Gibbs
Philip Gibbs

Reputation: 1

Need to access SQLite tables from cmd line

I have a DB created and accessed from an Android app I developed. However, I'd like to access tables outside my app. I've tried the command line tool 'sqlite3' and tried various SELECTS from the master, but it cannot find my DB file. In the code it's '/data/data/databases/dbname' but specifying this doesn't work. Further if I search my HD contents my DB is not found. Where the H... is the DB file and how do I access it from outside my Android app? Help greatly appreciated, and have a happy holiday season.

Upvotes: 0

Views: 107

Answers (1)

nandeesh
nandeesh

Reputation: 24820

Try this at adb shell

run-as <package-name> sqlite3 /data/data/<packagename>/databases/dbname

For this to work, your app should be debug build (process should be visible in ddms)

Upvotes: 1

Related Questions