Android Virtual Machine adb shell sqlite3 database, Android sqlite3

Source: Internet
Author: User

Android Virtual Machine adb shell sqlite3 database, Android sqlite3

 

 

Adb shell connection:

 

// Http://www.cnblogs.com/xiaobo-Linux/

Android stores all data in the data/data directory.

Run the cd command to go to the data/data directory:

Cd/data

LsCommand, you will see StudDB. db, which is our StudDB. db database.

Sqlite3 StudDB. db

This command will open the StudDB. db database. If the StudDB. db database does not exist, a new database named

StudDB. db database. (Note that the database name is case sensitive)

At the sqlite> prompt, enter

The. help Command shows many commands.

. Tables to view all tables. For example, my system has two tables: Student and android_metadata.

Select * from Student;

We found three pieces of data. The display method of this database makes us get used to Oralce, And it looks uncomfortable.

The following two commands change the display mode.

. Mode column

. Header on

Then input select * from Student; we are much more comfortable.

Exit sqlite with the. exit command and return to the # prompt.

Enter exit at the # prompt to exit Linux.

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.