如何从终端查询我的应用程序的 SQLite 数据库?
我需要它来进行调试,并检查值。
我尝试从模拟器命令行移动到/data/data//databases 文件夹并从那里执行“sqlite3”,但是 .database 命令没有返回我的数据库。
最佳答案
在你的sdk文件夹tools
里有一个特殊的工具。它被称为 sqlite3
。阅读更多 here .
您会在这里找到所有必要的信息,例如:
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
关于android - 访问终端以从 Android 执行查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5410049/