Android View database methods and tools __ Database

Source: Internet
Author: User
Tags sqlite sqlite database

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.