Sync arbitrary files with a server I'm looking for a way to keep a file (keepass .kdb) on my Droid2 in sync with one on a server.


This is just a file on the filesystem - not contacts, calendar, etc.
I need bidirectional, not just push or pull.  If the server's changes, download it, if the Android's changes, upload it.  Yes, this may result in conflicts that need resolved.


I'm using Unison to achieve this between PCs, but there's no Unison client for android.  I've found hand-waving about installing OCaml on Android and running Unison on that, but I'm hoping for something native.

Botsync sounds promising, but it's unidirectional - when making a config, you choose if it's upload or download.

I've seen sugarsync, but given that this is my KeePass file, I'd prefer to keep it on my own server.
You may have found something you are happy with now but I have compiled a binary of unison that works on android - it is possible using the hand-waving instructions you are talking about - I used them to cross-compile the linux source within ubuntu 12.10 using the android NDK and with a few alterations to the code it is now working. Follow the instructions at https://sites.google.com/site/keigoattic/ocaml-on-android and then you will need to do a few things. There is a file called pty.c in the unison source - find the following section: 

// openpty
#if defined(__linux)
#include &lt;pty.h&gt;
/*#define HAS_OPENPTY 1*/
#endif


and comment out define HAS_OPENPTY 1 as shown. You also need to open ubase/util.ml and edit:

let homeDir () =
  System.fspathFromString "/Your path here"


Comment out from here:

    (if (osType = `Unix) || isCygwin then
       safeGetenv "HOME"
     else if osType = `Win32 then
(*We don't want the behavior of Unison to depends on whether it is run
  from a Cygwin shell (where HOME is set) or in any other way (where
  HOME is usually not set)
       try System.getenv "HOME" (* Windows 9x with Cygwin HOME set *)
       with Not_found -&gt;
*)
       try System.getenv "USERPROFILE" (* Windows NT/2K standard *)
       with Not_found -&gt;
       try System.getenv "UNISON" (* Use UNISON dir if it is set *)
       with Not_found -&gt;
       "c:/" (* Default *)
     else
       assert false (* osType can't be anything else *))


...To here!

Then you'll also have to edit Makefile.Ocaml

   CWD=$(shell pwd)
    EXEC_EXT=
    WINOBJS=
    SYSTEM=generic
    # openpty is in the libutil library
    ifneq ($(OSARCH),solaris)
      ifneq ($(OSARCH),osx)
      #  CLIBS+=-cclib -lutil
      endif
    endif
    buildexecutable::
        @echo Building for Unix
  endif
endif


And comment out #  CLIBS+=-cclib -lutil as shown.

And as far as I can remember that all worked. The other step once compiled is to mount your android system partition as writable and copy unison to the /system folder where all the rest of the shell commands are.

Hope that is helpful to someone...I lost a lot of sleep getting it compiled.