I'm trying to access the sqlite database file on the device. I mean, I've launched the app on the device via adb. And now I wanto to download this file as I did before on emulator via DDMS. But when I select the device on DDMS and open the folder data, it is empty.
Is it the right way to do? Or there is another way to download this db file.
Thanks.
You can access to the data folder without root, provided the application is debuggable
<application
...
android:debuggable="true"
...
To list the base directory :
adb shell "run-as com.your.package ls -l"
To copy a file :
adb shell "run-as com.your.package cat relative/path > /sdcard/some_name"
adb pull /sdcard/some_name
Unfortunately pre-ICS run-as
is quite buggy. The usual symptom is a
run-as: Package 'com.your.package' is unknown
message.
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