google / adb-sync

Apache License 2.0
1.08k stars 171 forks source link

pull all /data directory #29

Open mcanonic opened 6 years ago

mcanonic commented 6 years ago

Hi, by using adb-sync --reverse /data/ noAction/ I want to download all files from /data, but I've got an error: adb: error: failed to copy '/data/var/run/netns/router' to 'noAction//var/run/netns/router': remote read failed: Invalid argument Interrupted-Pull-Delete: noAction//var/run/netns/router Total: 5 KB/s (81791 bytes in 14.811s) Traceback (most recent call last): File "../../adb-sync/adb-sync", line 774, in main(*sys.argv) File "../../adb-sync/adb-sync", line 769, in main syncer.PerformCopies() File "../../adb-sync/adb-sync", line 585, in PerformCopies self.num_bytes += s.st_size File "../../adb-sync/adb-sync", line 474, in exit fs.unlink(name) OSError: [Errno 2] No such file or directory: 'noAction//var/run/netns/router'

Two questions:

divVerent commented 5 years ago

A --keep-going flag, probably... seems like a good idea. Will think of that.

Venryx commented 5 years ago

For others wanting a way to have adb-sync "keep going" if it hits an error for a file, just put a try-catch (or try-except, rather) wrapper around the code within the for loop in PerformCopies().

Would still be nice to have a command-line flag for this behavior, though.