open-android-backup icon indicating copy to clipboard operation
open-android-backup copied to clipboard

remote couldn't create file: Operation not permitted // adb: error: failed to read copy response

Open Lost99-nobara opened this issue 1 year ago • 7 comments

Manufacturer: xiaomi Android version: 10 Custom ROM/rooted? no Model: mi 9 lite

Operating system: fedora


getting error when restoring files

image

Lost99-nobara avatar Jul 26 '24 22:07 Lost99-nobara

You must've run the script as root before, causing the temporary files to be removable only by root. Running this command in the script's directory should fix this:

sudo rm -rfv backup-tmp

mrrfv avatar Jul 28 '24 10:07 mrrfv

The image they posted seems to be the wrong one. I am facing the same issue. Here's what they mean. Whne restoring, this issue occurs on the adb push command. Android version: 14 Model: Galaxy s24 OS: Windows 10. image

Ri-Dearg avatar Aug 05 '24 21:08 Ri-Dearg

I'm having the same issue Manufacturer: Fairphone Android version: 14 Custom ROM/rooted? no Model: FP5

Operating system: Arch Linux

Restoring internal storage. ./backup-tmp/Storage/Alarms/: 1 file pushed, 0 skipped. 0.5 MB/s (45475 bytes in 0.087s) adb: error: failed to copy './backup-tmp/Storage/Android/data/com.airbnb.android/files/Pictures/pdp_golden_laurels/0688d821-35a9-436d-a8fd-9baba21fd87d.png' to '/storage/emulated/0/Android/data/com.airbnb.android/files/Pictures/pdp_golden_laurels/0688d821-35a9-436d-a8fd-9baba21fd87d.png': remote secure_mkdirs failed: Operation not permitted adb: error: failed to read copy response

felix-knopp avatar Aug 08 '24 10:08 felix-knopp

It seems to be specifically related to permission for the 0/Android/ directory.

I got past it by simply deleting the directories that wouldn't copy from the backup-tmp folder.

Once I was past that directory everything copied as expected. It may be very brand dependent.

Ri-Dearg avatar Aug 08 '24 17:08 Ri-Dearg

I believe adb-push can no longer access 0/Android/ since Android 11... Additionally, i think our issue might be different to the one @Lost99-nobara faces... Maybe we should open another issue for this.

I'm trying to leave out the 0/Android directory. However, this contains lots of data that I would have liked to backup/restore.

felix-knopp avatar Aug 09 '24 07:08 felix-knopp

I have succeeded to restore all files by changing the adb push ./backup-tmp/Storage/* /storage/emulated/0 command to adbsync push ./backup-tmp/Storage/ /storage/emulated/0 #

I'm using adbsync from here https://github.com/jb2170/better-adb-sync

felix-knopp avatar Aug 09 '24 14:08 felix-knopp

Removing the directory that wouldn't copy worked fine. adb-sync would not restore even without the 'faulty' directory, I got a Permission denied, and the program crashed. I would recommend that any person having this issue first comment out the part in the restore function that restores APKs because it's long and to first check every 'faulty' directory, and then do a full restore.

Niels-bt avatar Oct 04 '24 11:10 Niels-bt