Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lost99-nobara opened this issue Jul 26, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@Lost99-nobara
Copy link

Lost99-nobara commented Jul 26, 2024

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

Operating system: fedora


getting error when restoring files

image

@Lost99-nobara Lost99-nobara added the bug Something isn't working label Jul 26, 2024
@mrrfv
Copy link
Owner

mrrfv commented Jul 28, 2024

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
Copy link

Ri-Dearg commented Aug 5, 2024

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
Copy link

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
Copy link

Ri-Dearg commented Aug 8, 2024

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
Copy link

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
Copy link

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

@Niels-bt
Copy link

Niels-bt commented Oct 4, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants