Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

Using: Droid Bionic 4.04 without Root.

I can use the adb to pull a specific apk file to my PC, for example,

     adb pull /data/app/com.google.android.gm-1.apk C:\my-hacks

which pull gmail's apk file. But when I try to copy the entire /data/app directory with

     adb pull /data/app C:\myhacks

the command line reads
pull: building file list... 0 files pulled. 0 files skipped.

I don't understand why I have permission to pull specific files from /data/ but not everything.

share|improve this question
add comment

2 Answers 2

It's a "permission and privacy" thing. While the .apk does not have any privacy concerns involved (and thus can give read permission to everyone), the data do, and thus the directory is only readable by owner, group, and root (not by "other", which is what you would need -- "other" has only eXecute permissions).

ls -l / | grep data
drwxrwx--x   25 system   system  4096 Jan 28 17:51 data

Which means: Specifying the file directly, you can pull it (as it has the required file permissions, and the directory permits you to cd into due to the set eXecute bit). Specifying the directory instead fails, as this would require to change (cd) into the directory (which works) and build a list of files contained -- which is impossible due to the missing read permission on the directory entry itself.

share|improve this answer
add comment

Izzy's answer is good and well explained. Building on that, if you are root, you can open root explorer, navigate to /data/ and change the permissions on the app folder.

Simply long press the app, tap Permissions, and next to other, check the appropriate box(es).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.