android view app database

In development, it is often necessary to view the data in the app database and speak with facts. But the mobile phone without root does not seem to have access to data, androidstudio 3.0 has already helped us to do this step, even the mobile phone without root can export the database. There is a way to use chrome's inspect method to view, you need to overturn the wall, and the display is incomplete. Only some of the data can be viewed, so it is not recommended.

The first step is to upgrade AndroidStudio to 3.0 or higher.

The second step is to connect the mobile phone to the USB, and there is a devive File Explorer in the lower right corner of AndroidStudio. Click to open it as shown in the figure.


Data ->Data->package name, select the database db file, right-click and save it to the computer,

The third step is to drag the file to sqlitestudio or other visual database software to view (sqlitestudio is the software on mac, not sure if windows also have it)

Here is a piece of data, written demo to play. That's about it, no need for root

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324839691&siteId=291194637