Transferred from http://www.bangchui.org/read.php?tid=7792
Android can use SQLite data pants to store data, but Google does not directly provide us with the tools to manage the data in the database.
If you can't view it directly from the tool, we'll copy the database from the phone/emulator and use the tools to view it, and here's the steps
1. Confirm the location of the database
We can access part of the phone's directory via Eclipse's DDMS plugin
The database file is located in the package name/databases/of your program/data/data/
2. Copy the database file
We can use the ADB tool to download the database files
Command for ADB push mobile path Local path
For example, I want to copy the TEST.DB data under the project to my desktop, then run the command
./adb pull/data/com.test/databases/test.db ~/desktop/
3. Open the database file
Common SQLite database open tools:
1. SQLite Database Browser
http://sqlitebrowser.sourceforge.net/
2. SQLite Administrator
http://sqliteadmin.orbmu2k.de/
Very small, recommended to use.
3. SQLite expert-personal Edition
Personal Edition free, use enough
Http://www.sqliteexpert.com/download.html
Very good, very strong, recommended use.
4. Update Database Files
Also use ADB tools to upload
Command for ADB push local path mobile phone path
./ADB Push ~/desktop/alatest.db/data/data/com.test/databases/test.db