I am trying to pull my applications databases files, I can see that I have all the permissions in the database file "-rwxrwxrwx", which I provided by chmod -r 777 /data/data/com.example.myapp, but I am not able to, I constantly get the above error when I try to pull it and moreover the device manager keeps crashing.
The error that I get:
[2015-07-19 19:48:44 - ddms] transfer error: Permission denied
[2015-07-19 19:48:44] Failed to pull selection: Permission denied
I am using Android Studio, my device has root access and I am on a mac.
This is what I am trying to pull:
Edit: When I run the following command I get this error Package 'com.example.hackbot' has corrupt installation
:
run-as com.example.hackbot chmod /data/data/com.example.hackbot/databases/HackBotDB
Any help is valuable.
Cheers
this is easy to do:
adb shell
from command line or terminalrun-as com.myapplication.packagname
cd databases
cat my_datbase_name.db > /sdcard/my_database_name_temp.db
exit
and then exit
again to get back to the normal terminal promptadb pull /sdcard/my_database_name_temp.db
and that should be itYou can donwload sqlitebrowser to view this data
The adb shell linux user and your app linux user are different. So, for security reason, you can't get private app data from adb, but you can make a copy as you did. I agree, it's messy and unclean but it's been designed that way. So my suggestion is to add Stetho to your app. You can monitor your DB from Chrome, as well as getting other debug infos.
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