In Android Application Development, we may sometimes use the built-in database sqlite3 in the system. For example, we have created a database in an application, how to view the database or the tables or data contained in the database. The following describes how to create a database and a table in an application and view the database and table using the command line. augurit. the login application creates augurcity. DB database and sysuser table ]. For example:
In, except for the last red box, the other boxes are commands under the ADB shell.
[1] In Android, data inventory is usually stored in the/data/[application package name]/databases directory.
[2] cd command: folder jump command. LS command: view the files in a folder.
[3] use the "sqlite3 [database name]" command to perform a series of operations on a database.
[4] After step 3, you can run the. Tables command to view the tables contained in a database. To query the data contained in a table, run the SQLite> command and enter the SQL statement to query the data. However, you must use the semicolon [;] to end the input of the statement.
[5] If you enter the ADB shell in the command line, the prompt is: ADB is not an internal or external command, or a program that can be run, or a batch file, this problem occurs because the environment variables are not set properly. Solution: Find the directory where the ADB tool is located under the installed Android SDK package, which is generally in... /Android-SDK-Windows/tools directory or... /Android-SDK-Windows/platform-tools directory. Add the directory to the PATH environment variable.