For now, I've found a partial solution using SparkleShare and Agit. I say partial because I can get the files easily on my Android devices, but not have them automatically synchronized. Also, I cannot send files from my Android device by this mean.
SparkleShare keeps folder(s) synchronized across many computers. Change something in one of these folder in one of the computers, and will apply automatically the same change on the other computers. The problem is that there is no real Android client (there is an official Android client, but it's basically useless).
On the server part, the only thing SparkleShare requires is a Git server. Sparkleshare client will also connect to a notification broadcast server, but only hashes are exchanged on this server, so it's safe to use the official notification server for everything.
Here is the trick : for now, on my Android devices, I only want to get the files. I don't want to modify them or add some. Also, I'm fine with running a synchronization manually from time to time. So I don't need the notifications. On my Android devices, I only need a git client. This is where Agit comes into play.
Let's say we synchronize our photo album using SparkleShare, and let say we want them to appear in Android Gallery. The SparkleShare repository is hosted on one of our own computer - alpha.kwain.net in this example - in /home/jflesch/sync/photos. We access it using ssh (login: jflesch). For the photos to appear in Android Gallery, we must have them in /sdcard/DCIM. So in Agit, you just have to use the following settings:
- URL: ssh://firstname.lastname@example.org/home/jflesch/sync/photos
- Uncheck 'default folder'
- Target folder: /sdcard/DCIM/photos
- Uncheck 'Bare' (otherwise you will be able to browse the repository content with Agit, but the photos won't be extracted from the repository).
- Press 'Clone'.
- Agit will ask you if the server key is ok. Beware that this popup may appear in background ! Keep an eye on the notification area of Android.
- Next Agit will ask your password (I haven't found yet how to use public key authentication)
Then it's time to make coffee.
Note that Android Gallery won't take into account the new photos automatically (I have no idea why they don't use inotify). You may have to purge Android Gallery cache (settings -> Applications -> All -> Gallery -> Erase data / Purge cache) or even restart your device to see the photos.
This is definitively not as good as it could be, but it's a start. A real improvement would be to have a real Android client for Sparkleshare (using Jgit for instance).