View the app database of Android phones without root permission

Source: Internet
Author: User

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 '''


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.