在命令提示符下打开sqlite的分贝分贝、命令提示符、sqlite

2023-09-05 08:17:57 作者:想被你宠坏

朋友, 我工作的sqlite的数据库,我想打开,查看或创建通过亚行的shell命令数据库。 我已经写了下面的命令在命令提示符

Friends, I am working on Sqlite DB and I want to open, view or create databases through the ADB shell command. I've written the following commands in command prompt

CD C:\ Android的sdk_r04-WINDOWS \ Android的SDK-WINDOWS \工具> 亚行外壳 cd C:\android-sdk_r04-windows\android-sdk-windows\tools> adb shell

我收到了 $ 2步。 任何想法我如何能得到源码> 提示符,而不是和执行以下任务

I get a $ after step 2. Any idea how I can get sqlite> prompt instead and perform the following task?

假设我要查看的数据库。我已经写了 CD /数据/数据​​/(mypackage中)/数据库 sqlite3的(数据库)......之后, $ 但它说找不到数据库。 如何查看通过我的code所执行的数据库?

Suppose I want to view the databases. I've written cd/data/data/(mypackage)/databases sqlite3 (database)... after the $ but it says 'Database not found.' How can I view the databases executed through my code?

在此先感谢。

推荐答案

您可以使用sqlite3的命令从亚行外壳连接到数据库。查找例如这里 这将打开一个SQL提示,您可以执行支持的标准命令。这也解释了创建数据库,创建表和查看所有的命令提示符(ADB壳)其内容的另一个链接的这里。

You can use sqlite3 command to connect to database from adb shell. Find example here This will open an sql prompt where you can execute standard commands supported. Another link which explains creating a database, creating table and viewing its contents all from command prompt (adb shell) is here.