Build Rsync for Android Yourself

To build rsync for Android you’ll need to have the Android NDK installed already.

Then clone the rsync for android source (e.g. from CyanogenMod LineageOS) …

… create the missing jni/  build file (e.g. from this Gist) and adapt it to your case

… and start the build with

You’ll find your self-build rsync in obj/local/*/rsync . 😀

Update 2017-10-06:

  • Updated sources from CyanogenMod to LineageOS.
  • Added links to Gist and Andoid NDK docs
  • Updated steps to work with up-to-date setups

If you get something like the following warnings and errors …

… you probably need to update config.h and change /* #undef MAJOR_IN_SYSMACROS */ to #define MAJOR_IN_SYSMACROS 1 .

5 thoughts on “Build Rsync for Android Yourself”

  1. Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-14.    Android NDK: There is no under /data/rsync-android/android_external_rsync/jni    Android NDK: If this is intentional  please define APP_BUILD_SCRIPT to point   Android NDK: to a valid NDK build script.    /opt/android-ndk/build/core/ *** Android NDK: Aborting…    .  Stop. well you need to provide something for the, don’t you?

    1. Sorry, I didn’t notice there was no link to the Gist in the text. Now it’s there. 🙂

    1. I’m sorry, but no. I needed an up-to-date rsync to scratch my own itch and this post was basically me documenting the “missing parts” from the documentation for my future self (and maybe others 😉).

Leave a Reply

Your email address will not be published. Required fields are marked *