How can I extract the database of an application from an android device through an adb shell command?
If you have neither SD card nor root on your device, just use adb shell.
$ adb shell
$ run-as com.your.package cat /data/data/com.your.package/databases/your_db > /storage/sdcard0/Download/your.db
Then use DDMS to pull file out.
Databases are stored in files, mostly on internal storage, in App's data directory like :
/data/data/com.example.myapp/mydb
so you can do
adb pull /data/data/com.example.myapp/mydb
Then you can use some software to open that file, and work with data base. To place it back:
adb push <new file> /data/data/com.example.myapp/mydb
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With