For some time, I've been happily using Unison in conjunction with my Android phone's USB mass storage function to synchronize files between my phone and my desktop. It was simple: I'd plug in my phone with USB and enable the SD card to be used as a mass storage device, then mount it in Linux and run Unison as if the phone was a local folder (with appropriate tweaks to support the FAT filesystem).
Alas, my phone was getting on in years (or months, as it is in tech), and with support long dropped and capacity nigh exhausted, I had to upgrade. With my new phone I've been promoted to the “new hotness” that is Android 6 Marshmallow, but one of the functions that was dropped along the way was the ability to expose the SD card as mass storage over USB. Admittedly it wasn't a perfect solution, requiring unmounting the SD card within Android itself while using it over USB, but the current approaches introduce their own deficiencies. In any case, my previous workflow wasn't going to work anymore.
Of course I didn't want to stop using Unison, or have Unison re-copy everything, or even merely re-scan everything. I [...]
Read this post