开发者

Access a terminal to execute Queries from Android

开发者 https://www.devze.com 2023-02-19 12:26 出处:网络
How can I query my SQLite database of my application from a terminal? I need it to debug purposes, and also to che开发者_JAVA百科ck values.

How can I query my SQLite database of my application from a terminal?

I need it to debug purposes, and also to che开发者_JAVA百科ck values.

I tried from the Emulator Command Line, I moved to the /data/data//databases folder and executed "sqlite3" from there, but .database command doesn't returns my databases.


There is a special tool in your sdk folder tools. It is called sqlite3. Read more here.

THere you'll find all the necessary information like:

From an adb remote shell, you can use the sqlite3 command-line program to manage SQLite databases created by Android applications. The sqlite3 tool includes many useful commands, such as .dump to print out the contents of a table and .schema to print the SQL CREATE statement for an existing table. The tool also gives you the ability to execute SQLite commands on the fly

0

精彩评论

暂无评论...
验证码 换一张
取 消