To view the database, you must first find the db file, if copied to the computer, view more methods, on the phone, with commands to view the comparison is direct and convenient.
First to find the location of the database, the general database is stored in the program's private directory, so to get root permissions.
Make sure the development tool is connected to the phone, open the command line, enter the ADB shell
At this point do not get root permissions, input su, hand pop-up prompt, allow to get root permissions
The suffix changes to "#" and the root permission is successfully obtained, so you can enter the application's private directory.
Enter the CD data/data/ package name /databases/, enter the directory of the database
The following are some basic SQLite commands
first Open the database , enter Sqlite3 test_db, open a file named test_db data.
to view the structure of the database, enter the . Schema
View some of the data
It's a little hard to see, to make the data look more beautiful, enter. Head on, display column names, enter. Mode column, display by class
Looks more comfortable.
To see how many tables, enter a. Table
View the structure of a single table,. Schema TableName
The above command to make a simple view of the database, should be sufficient.