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

Doesn't resync "half-pulled" (or "half-pushed") files #23

Open
TomasRiker opened this issue Jan 13, 2023 · 5 comments
Open

Doesn't resync "half-pulled" (or "half-pushed") files #23

TomasRiker opened this issue Jan 13, 2023 · 5 comments

Comments

@TomasRiker
Copy link

I just aborted a sync, so one big file ended up being pulled only half.
The next sync, that file didn't get synced again.
better-adb-sync should check if files have the correct size, and if not, resync.

@jb2170
Copy link
Owner

jb2170 commented Feb 12, 2023

I'd guess the half-copied file being left behind is more an issue with adb than adbsync since adb push ${filename} is used to copy the file.
Perhaps a --checksum, -c option could be implemented, that rsync has?

@TomasRiker
Copy link
Author

TomasRiker commented Feb 12, 2023

I wouldn't say it's an issue with adb. When adb is terminated during a transfer (because the user kills better-adb-sync), there's not much it can do about it. Well, maybe it could write the file to a temporary location and move it to the final destination after the transfer is complete. But adb behaves as it does, and if better-adb-sync depends on adb, then it should be able to cope with its peculiarities, in my opinion.

Using checksums would be nice, since it could also detect files that have the same size but differ in content. For the beginning, checking only the size would be fine, too :-)

@Joshfindit
Copy link

Since adb is all or nothing, I think a solid approach would be to catch the cancellation and ask whether the user wants to delete the partial file (99% of use-cases) or keep it (if doing data recovery for example).

@Vadworks
Copy link

Vadworks commented Apr 5, 2024

It might be possible to compare file sizes. This would be faster than checksum, which would require reading all the files (potentially gigs of data)
Seems adbsync is already pulling file lists, so just an extra step to compare sizes?

I'm glad I double checked this behavior, since my laptop kept falling asleep during sync, now I have a bunch of half copied pictures/videos.

@kokroo
Copy link

kokroo commented Oct 31, 2024

"sync" in the name really doesn't do justice if it doesn't actually verify if the files were copied over properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants