There is no such file or directory when 'cp', but not with 'ls'

I am trying to copy the general settings folder of my application to the / sdcard section from my PC using the following ADB command:

adb shell su -c "cp /data/data/com.anrapps.pixelbatterysaver/shared_prefs/ / SDCard / AppData /"

But this returns cp: Skipped dir '/data/data/com.anrapps.pixelbatterysaver/shared_prefs': No such file or directory . However, when running the ls command, it says that the folder is present:

adb shell su -c "ls / data / data / com.anrapps.pixelbatterysaver"

cache code_cache shared_prefs files

What is the problem? Could it be related to permission?

-one
android shell cp adb ls
Oct 10 '16 at 15:23
source share
1 answer

If you are trying to copy the entire directory, you need to use cp -r to make it recursive.

+2
Oct 10 '16 at 15:40
source share



All Articles