FileSync — The Android app I made for synchronising files & folders between devices
A few years back, after sitting in traffic for an hour listening to the radio, having forgotten to put the SD card with all my music on back into the car, I had one of those “there has to be a better way” moments. See, my car’s SD slot is the perfect way to store my library of music for easy access, but it’s not the perfect way to keep that library up to date. For that, I have to remove the SD card, take it to my PC, add and delete any recent changes to my library, eject it, and then take it back to the car. Enter, FileSync.
FileSync is an Android app which I wrote to solve this exact problem, but ended up just flexible enough to solve a few more too. FileSync is a super simple file synchronisation app, where you add a series of “Synchronisations” that can be called upon quickly and easily. These synchronisations might be from one folder on your phone to another, or from a network share to your phone, or — and here’s my use case — from a network share to a connected USB device.
Thanks to this latter use case, my process for keeping the music in my car up to date got a whole lot easier. Now, when I know I have new music sitting in my library, and I have that “Ah ****, I’ve forgotten to put the new stuff on my SD card” moment whilst sat in the driver’s seat, I just connect the SD card to my phone (using an SD card adapter with USB-C), open FileSync, and run the “Car music” job. It blitzes through the changes, comparing all my existing files to make sure nothing needs deleting or updating, and moments later I can put the SD card back in my car and I’m good to go.
Now, I appreciate the niche nature of this app. I’m under no illusions that I’ve discovered the next “IFTT” here. This whole project was a purely technical experimentation that combined some Android programming with the use of the fantastic JCIFS SMB library. FileSync was a bit of a passion project, but it is by no means a polished or professional job. That said, it is of course free and open-source, so there’s only so much you can complain about!
As part of FileSync’s creation, I got to learn about some really cool technologies in the world of file management. I implemented a custom SMB browser, battled (and eventually lost) against the much more frustrating world of calculating and comparing file hashes over a network without it taking forever (spoiler alert: you can’t, so comparing file names and sizes is as good as you’ll get), and just generally got to understand how Android systems such as DocumentFile work these days.
The app itself isn’t currently on the Google Play store, as that’s a whole different beast by itself, and perhaps more so because this was just a proof of concept, not a release-ready app. But of course you’re welcome to download, build and even change the source code, which is on GitHub.
Whilst writing this blog post up, I’ve already started to think of a few potential uses for FileSync, like saving photos on the phone to a connected USB stick, or easily backing them up to a network share, but I’m sure there are plenty more. Maybe if I think of one valuable enough to have even small-market appeal, I might go to the trouble of getting it on Google Play!