1

I'm trying to move all sub-folder of a folder on my desktop to the 'files' folder in the internal app storage of the app I developed.

My first attempt with one file:

/e/Android/android-sdk/platform-tools
$ adb push pull.sh /data/data/irisrecognition.example.com.irisrecognition
failed to copy 'pull.sh' to 'C:/Program Files/Git/data/data/irisrecognition.example.com.irisrecognition': No such file or directory
26 KB/s (315 bytes in 0.011s)

Why does the GIT path gets added to my data path? I also tried using adb shell, run-as etc to no avail.

Keith OYS
  • 2,285
  • 5
  • 32
  • 38
4ndro1d
  • 2,926
  • 7
  • 35
  • 65
  • 1
    Possible duplicate of [Copying files in ADB shell with run-as](http://stackoverflow.com/questions/22703254/copying-files-in-adb-shell-with-run-as) – Alex P. Dec 27 '16 at 17:17

2 Answers2

0

Here is what worked for our App:

  • Ensure the device is connected.
  • Open a console.
  • Finally, run something like:
    adb push C:\my-location\my-data\. /storage/emulated/0/Android/data/my.package.name
    

    But edit above's paths to your requirements (specially the "my.package.name" part).

Note that the "." dot means current-directory, but by putting "C:\my-location\data\" in front of it, we mark that path to be current.

Also, the destination-directrory is auto created (if it does not already exist).

Top-Master
  • 7,611
  • 5
  • 39
  • 71
-2

You can't simply push or pull files into or from the internal storage of an app. If it would have been possible, any 3rd party app could fetch or inject data into an app's private storage space.

If you really want to do this, you need to have root access.

  • a simple workaround is to create a zip file of your desired directory and use adb push that zip file and unzip that later – Mithson Jul 09 '22 at 07:48