Android development experience Share (1) Solve some phones cannot enter SQLite database under the shell

Source: Internet
Author: User

Today, I share with you a variety of problems that have been encountered in Android development in the past 1 years: Today's development projects want to see the local SQLite database, the previous client can not be used for free. And you have to start tossing yourself. Try to get into the shell to see the data in the SQLite database.

First, the phone must be rooted out. I use Baidu one-click Root function, after the phone root. Connect your phone with a USB cable. After the connection, I use the command Cd/data/data into the data file, I use ll command but I found I can not enter. Tips are as follows:

Carefully read the hint: know that the original is not authorized, then I just give him permission on it can be su root

See, I wrote this database in the databases of the project Pay.db

Then use sqlite3 pay.db

Use Query to query the SELECT * from card; especially pay attention to writing query statements, don't forget the semicolon!!

Of course, the process is not so smooth. When I first entered the system, I found that the system could not recognize the sqlite3 command, so I took this sqlite3 from the simulator and added it to the real machine directory and opened it with Eclipse's fileexproer.

Of course, you have noticed that there is no sqlite3 the permissions of this file have been modified by me I use chmod 777 Sqlite3 to modify the permissions of the file. So if you haven't modified it, you may not be able to manipulate the Sqlite3 database.

Then you can use the emulator's sqlite3 copy to the real machine for testing. I queried the results, because it is embedded project, and hardware arm interaction, so a lot of data people feel a little strange hey

Of course, I have a problem is not solved, is the Chinese display garbled problem, please bo friends help!

Android development experience Share (1) Solve some phones cannot enter SQLite database under the shell

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.