I have an issue, which is that when I try to sync an .img file to Dropbox on Android (via DropSync app), the entire file is reuploaded when even a single byte is changed. This doesn't happen with other files. I get the same behavior when using the DB for Windows desktop app. The files were created by Linux Deploy, an app that allows to run a Linux distro on rooted Android devices, in a chroot jail. LD uses the standard 'dd' utility to create the file. The file in question is 6+GB, so reuploading all of it when changes are made is undesirable. Is there something unique/different about img files that causes this? How can upload only the changes?

  • Can your break your IMG files into smaller pieces, such as 500MB a piece? Have you considered using an encryptor that works on the file level? This way if a file changes, only the modified files are sent again for syncing. This might be a better approach than IMG -- although your provider may be able to see your file names. play.google.com/store/apps/details?id=com.boxcryptor.android – Sun Mar 2 '15 at 16:42

Dropbox works by splitting the file into pieces (like Bittorrent). I don't know if the iOS or Android apps work the same, but Dropbox will just verify the split 4MB file pieces are identical and not upload it again. The .IMG file is most likely changing the content enough so that the file pieces do not match the previous upload.

| improve this answer | |
  • @ sunk818: Nice answer, but I'm not quite sure I understand the rationale behind your explanation. I also have a TrueCrypt container file, I get exactly the same behavior when trying to sync that to Dropbox. At first I thought it was something peculiar/different about img files that caused this behavior. I apologize to everyone in advance for not responding quickly, been very busy and forgot I posted, especially since noone answered for a few days. Surely there must be a way to only sync the changes......... – Enigma83 Feb 27 '15 at 16:37
  • 1
    @Enigma83 Are you sure that only a single byte of the resulting file is being changed? Depending on the format, a single-byte change of "decoded" data may cause a larger change to the final resulting file. – NReilingh Feb 28 '15 at 16:06

Dropbox uses 'delta sync' which means only modified portions of files are downloaded/uploaded, instead of transferring entire files every time they’re changed. However, the Android app DropSync does not support delta sync.

The reason this doesn't work with a TrueCrypt container (or any other encryption program worth it's salt) or some disk imaging solutions is that changing even one bye of the file in the container or disk image is going to change the entire container or disk image. The encryption would be severely compromised if you could change only one byte in the container and only one byte changed in the resulting container file.

| improve this answer | |
  • @ Bert: Technically, you've answered my question, or at least provided a concise explanation that makes sense. I'll mark as solved here in a bit, but can you (or anyone else) maybe give some suggestions on alternative approaches I can try to sync this? I think next I'll try installing Linux to an ext4 partition on my SD card, then either use DB or rsync to try to upload it online. I would just have to make sure all files retain the correct permissions during this process. – Enigma83 Mar 1 '15 at 18:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.