gpt4 book ai didi

android - 访问终端以从 Android 执行查询

转载 作者:行者123 更新时间:2023-11-29 22:27:31 26 4
gpt4 key购买 nike

如何从终端查询我的应用程序的 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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com