mrrfv / open-android-backup

Back up your device without vendor lock-ins, using insecure software or root. Supports encryption and compression out of the box. Works cross-platform.
http://openandroidbackup.me/
GNU General Public License v3.0
733 stars 38 forks source link

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

Open Lost99-nobara opened 1 month ago

Lost99-nobara commented 1 month ago

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

Operating system: fedora


getting error when restoring files

image

mrrfv commented 1 month ago

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
Ri-Dearg commented 1 month ago

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

felix-knopp commented 1 month ago

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

Ri-Dearg commented 1 month ago

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.

felix-knopp commented 1 month ago

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 commented 1 month ago

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