1

I was attempting to access the data data folder of an application without rooting . I followed How to access data/data folder in Android device? and was able to access the folder.

Now I was trying to copy the required file from data/data to a folder in my SD Card , however I get a permission denied on it. In the thread I have referenced above , no body complained of this behaviour so I suppose it shouldn't happen at my end too .

This is exactly what I am doing

C:\AndroidSdk\platform-tools>adb shell
shell@D6503:/ $ run-as com.xxx.xxx
run-as com.xxx.xxx
shell@D6503:/data/data/com.xxx.xxx $ cp databases/xxx.db /storage/sdcard1/Pictures/ 
cp: /storage/sdcard1/Pictures/xxx.db: Permission denied

I have verified that the folder /storage/sdcard1/Pictures is accessible through shell.

Community
  • 1
  • 1
Muhammad Ahmed AbuTalib
  • 4,080
  • 4
  • 36
  • 59

1 Answers1

1

Happened to me as well. This is what I did to access the contents of the data folder of my app in my Nexus 5 (Android 5.0), without having root access or chmoding any file:

  1. Open a console where your ADB is located and execute:

    adb backup -noapk com.your.packagename

    You will be asked to accept the backup on your device. Accept it and don't use any password. Once the backup process is completed, you will have a file with .ab extension on your ADB folder.

  2. The backup will be compressed in a special way, you can decompress it with this tool: Android Backup Extractor

    To use it, unzip it and put the backup file (*.ab) on the same folder where the extractor (abe.jar) is. Then open a console there and execute the following command:

    java -jar abe.jar unpack NAME_OF_BACKUP.ab NAME_OF_BACKUP.tar

    Notice that the result of this operation will be a *.tar file, which can be opened or decompressed with WinRAR or many other compression tools.

  3. OPTIONAL for SQLite Databases: If you want to see the contents of the database, you can use this Firefox plug-in: Firefox SQLite Manager

Molex
  • 46
  • 3