In the case of database operations, the execution of operations statements such as queries or deletions often fails, but there is no specific reason for finding them. The following is a command-line way to perform database operations to verify that the database operation statements in Android are correct, and so on.
The following are the steps:
(1) Enter into the console, enter the ADB shell, into the command mode environment;
(2) Input command: cd/data/data/
(3) Input command: CD com.android.***, enter your database file (where com.android.*** is the file where your database resides);
(4) You can use the Ls-l command to view the files in the current directory;
(5) Input: CD databases into the database file;
(6) (optional) via the command line: LS-L Displays the database you created in your database;
(7) Input: Sqlite3 info.db into the database of your choice;
(8) Input:. Tables view the table you built;
(9) Input: SELECT * FROM table_name, can view the whole table information;
Note: After you manipulate the statement, you must add ";" to the end, otherwise you will always be waiting for the input state.
(10) At this point, you can use other SQL statements to further manipulate the table.
The details of this step are as follows:
Use the ADB command to view databases in Android