To locate bugs, testers often need to query their own databases. The method is actually very simple.
1. Install ADB and mobile phone driver on your computer
2. Run ADB shell in the command line
3. Execute the following command:
CD Data/Data
Run-As COM. Package '''com. Package is the package name of your app. In this case, the LS command permission is restricted and the file name ''' cannot be seen '''
Ls ''': Check whether the app stores databases in COM. Package '''
CD Databases
Dd If = **. dB of =/mnt/sdcard /**. before dB **. DB is the database file to be exported, and the last one can be freely named. It is placed under the sdcard to replicate ''' in step 1 '''
4. Then, you can directly download the DB files in the MNT/sdcard/directory to your computer using tools such as 91 assistant.
5. You can use tools such as SQLite expert to open dB files on your computer.
So easy (* ^ __^ *) Xi ......
[Note] after upgrading to android4.1.1, it is found that the sdcard is not in the/NMT directory. Therefore, the directory after "of" must be changed accordingly.
*************
There are also simpler methods:
1. Install ADB and mobile phone driver on your computer
2. Run ADB shell AM broadcast-a com. Package. copydb in the command line.
'''Com. Package is the package name of your app. With this command, the database will be directly copied to the sdcard directory '''