Anton111111 Anton111111 - 2 months ago 48
Android Question

Can't move folder in android terminal

I'm trying to write a small backup script, but the mv command in android does not work not like linux.
For example, i execute the following command:

adb shell mv "/system/app/Books/" "/sdcard1/temp/debloat_bkp/system/app/Books/"


i get the following error:

mv: invalid option -- P
usage: mv [-fiv] source target
mv [-fiv] source ... directory
mv: /system/bin/cp: terminated with 1 (non-zero) status


Have any ideas why i get this error and how to solve this problem?

Answer

You need to be root for this directory/path, i guess:

/system/app/Books/

http://stackoverflow.com/a/18935228/4409113

And that is not a good way though,

Use: backing up android device using adb

adb backup -apk -shared -all