I'm telling that someone who comes up with a decent file sync setup between iPhone, Android and Linux/Windows without charging a monthly fee will make some good money on one-time buy fees alone. Dropbox etc can do things like these but I'm not interested in paying monthly fees for using my own storage across devices.
For my desktop systems I do a nighly rsync to a central onsite server, which does nighly encrypted ZFS send to an offsite archive. I suppose a script could trigger on file change using Linux file watch features (exposed via CLI and C headers). What I'm not sure about is wether two way sync with rsync is possible. This could run as a simple daemonized bash script. On error the script would just retry. Rsync would have to handle conflicts, it probably has features for it. Paste this comment into a coding CLI and boom, you have your solution :). Does need rooted Android for running shell scripts on boot. But a good coding CLI can log into your phone and set everything up.