How do you view Android sqlite?

Asked 2 years ago, Updated 2 years ago, 20 views

I want to see it like mysql during sqlite practice, what should I do? I saw on the internet that I can use ddms or adb, but I can't ddms says it's in file exporter-data, but there's nothing in my data folder The adb says it's denied permission. How do I check it?

android

2022-09-21 17:42

1 Answers

Method 1.

You can copy the database file to your PC and verify it. Please refer to the command below and test it. com.xxx.If the part marked yyy has the actual package name xx.db, the part marked as xx.db must have the actual database file name.

adb shell "run-as com.xxx.yyy chmod 666 /data/data/com.xxx.yyy/databases/xxx.db"
adb pull /data/data/com.xxx.yyy/databases/xxx.db .

Method 2.

The stetho library created by Facebook allows you to open database files through the developer tools of the Chrome browser. It's much more convenient and useful than Method 1 because you can monitor databases in real time. Please refer to the following link for instructions and instructions.


2022-09-21 17:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.