How to access the system.DocumentDirectory on Android and copy files

Hi Android experts,

how do I copy files from my system.DocumentDirectory onto the PC ?

The only way I know if is to write a LUA program that reads and copies the file.

I tried

  • adb shell command. I didn’t find a shell command to copy files. No copy/mode
  • ES File explorer : tool couldn’t access the /data/data/…/app_data directory that system.DocumentDirectory pointed to

Any other easy way of doing this ?
Thanks
Frank

Hi,

You can use adb pull <remote> <local>.  For example if my package name were package.name.something then I could do:

adb pull /data/data/package.name.something/ ~/Desktop/some_folder/

This should copy all the files in the package.name.something directory on your phone to the some_folder directory on your desktop.

Thanks David. Much appreciated. Little addition here

  • adb pull /data/data/package.name.something/ ~/Desktop/some_folder/ does not work.
    I am getting “pull: building file list… 0 files pulled. 0 files skipped.”

It might be the adb version (1.0.29) I am using. Not sure. This worked

  • adb pull /data/data/package.name.something/ ~/Desktop/some_folder/<NameOfTheFile> <targetDir>

Best
Frank

Plus David, do you know how to do the same with IOS ?

Hi,

Unfortunately I don’t know how to do this on iOS.  You can try asking on the iOS forums to see if anyone there knows.

PS. I’m my name isn’t David.  :wink:

Hi,

You can use adb pull <remote> <local>.  For example if my package name were package.name.something then I could do:

adb pull /data/data/package.name.something/ ~/Desktop/some_folder/

This should copy all the files in the package.name.something directory on your phone to the some_folder directory on your desktop.

Thanks David. Much appreciated. Little addition here

  • adb pull /data/data/package.name.something/ ~/Desktop/some_folder/ does not work.
    I am getting “pull: building file list… 0 files pulled. 0 files skipped.”

It might be the adb version (1.0.29) I am using. Not sure. This worked

  • adb pull /data/data/package.name.something/ ~/Desktop/some_folder/<NameOfTheFile> <targetDir>

Best
Frank

Plus David, do you know how to do the same with IOS ?

Hi,

Unfortunately I don’t know how to do this on iOS.  You can try asking on the iOS forums to see if anyone there knows.

PS. I’m my name isn’t David.  :wink: