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