Android device manager: "Transfer error: permission denied"

I'm trying to pull out the application database files, I see that I have all the permissions in the database file "-rwxrwxrwx", which I gave to chmod -r 777 / data / data / com.example.myapp, but I can’t, I constantly I get the above error when I try to pull it out, and, in addition, the device manager continues to crash.

The error I am getting is:

[2015-07-19 19:48:44 - ddms] transmission error: permission denied

[2015-07-19 19:48:44] Failed to allocate allocation: Permission denied

I use Android Studio, my device has root access and I am on a mac.

Here is what I am trying to pull:

enter image description here

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.

Greetings

+6
source share
3 answers

The linux user of the adb shell and the user of your linux application are different. Therefore, for security reasons, you cannot get private application data from adb, but you can make a copy just like you. I agree, it is dirty and unclean, but it was designed that way. So my suggestion is to add Stetho to your application. You can control your database from Chrome, as well as receive other debugging information.

+4
source

this is easy to do:

  • connect your device and run adb shell from the command line or terminal
  • At the command line run-as com.myapplication.packagname
  • then cd to the cd databases folder
  • Then run cat my_datbase_name.db > /sdcard/my_database_name_temp.db
  • run exit and then exit again to return to the regular terminal prompt
  • run adb pull /sdcard/my_database_name_temb.db and it should be it

You can download sqlitebrowser to view this data.

+6
source
  • Launch the application using the Android emulator, and then β†’ tools-> the monitor of the Android device, the Explorer dialog box opens β†’ data folder (give permission to the data folder)
    • open cmd using the start menu
    • go to the sdk folder (e.g. C: \ Users \ android-sdks \ platform-tools>)
    • adb shell type
    • sous
    • chmod 777 / data li>
    • chmod 777 / data / data / in.co.gesardisplays.www.rwfiles / files / gesar.txt changes will be affected in adb monitor
  • Pull files to a folder
    • exit from the shell
    • follow previous step 1.2
    • enter adb root
    • adb pull / data / data / in.co.gesardisplays.www.rwfiles / files / or select the ur file, click on the file icon, which will be located in the upper right corner of the file browser.
-1
source

All Articles