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) …

git clone https://github.com/LineageOS/android_external_rsync.git
cd android_external_rsync
# checkout the most recent branch
git checkout cm-14.1

… create the missing

jni/Application.mk

build file (e.g. from this Gist) and adapt it to your case

… and start the build with

export NDK_PROJECT_PATH=pwd ndk-build -d rsync

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 …

[...]
./flist.c:454:16: warning: implicit declaration of function 'major' is invalid in C99
      [-Wimplicit-function-declaration]
                        if ((uint32)major(rdev) == rdev_major)
                                    ^
./flist.c:458:41: warning: implicit declaration of function 'minor' is invalid in C99
      [-Wimplicit-function-declaration]
                        if (protocol_version < 30 && (uint32)minor(rdev) <= 0xFFu)
                                                             ^
./flist.c:467:11: warning: implicit declaration of function 'makedev' is invalid in C99
      [-Wimplicit-function-declaration]
                        rdev = MAKEDEV(major(rdev), 0);
                               ^
./rsync.h:446:36: note: expanded from macro 'MAKEDEV'
#define MAKEDEV(devmajor,devminor) makedev(devmajor,devminor)
                                   ^
3 warnings generated.
[...]
./flist.c:473: error: undefined reference to 'makedev'
./flist.c:454: error: undefined reference to 'major'
./flist.c:457: error: undefined reference to 'major'
./flist.c:458: error: undefined reference to 'minor'
./flist.c:467: error: undefined reference to 'major'
./flist.c:467: error: undefined reference to 'makedev'
./flist.c:617: error: undefined reference to 'major'
./flist.c:619: error: undefined reference to 'minor'
./flist.c:621: error: undefined reference to 'minor'
./flist.c:788: error: undefined reference to 'makedev'
./flist.c:869: error: undefined reference to 'makedev'
./flist.c:1027: error: undefined reference to 'minor'
clang++: error: linker command failed with exit code 1 (use -v to see invocation) 
make: *** [obj/local/armeabi-v7a/rsync] Error 1

… you probably need to update

config.h

and change

/* #undef MAJOR_IN_SYSMACROS */

to

#define MAJOR_IN_SYSMACROS 1

.

Nexus V

Nexus 5 Package
Nexus 5 Package

I’m happy … I received my new Nexus 5 just last Thursday. You won’t believe how amazing this 3 generation leap feels … remember I’m coming from a Nexus S. 😉 I had the chance to toy around with it over the weekend and I must say: I like it. It’s well-built. It has a beautiful screen. The software is top notch (at least if you’re not as paranoid as I am).

The screen resolution is a funny matter, because the Nexus 5 is now second rank at home. Only losing to a Retina MacBook Pro. 😉

What I like:

  • It’s blazingly fast (at least generally 😉 )
  • The screen is gorgeous
  • I can now run Firefox as my main browser without killing all other apps 😉
  • Going to alarms with a swipe (in the Clock app) is a relief
  • Configuring app icons and widgets on the home screen is well done

What I don’t like:

  • I’ve come to miss several niceties of CyanogenMod over the years
  • You can’t get rid of the Search bar on the home screen (yes, I know the “home screen” is part of the “Google Search” app now)
  • The speaker (yes, only one) is crap
  • You need a special desktop app to copy files over USB, WTF?!?
  • I need to start some apps twice, because they crash the first time 🙁
  • It comes without a headset 🙁
  • The abandonment of core apps on favor of Google flavored ones (like integrating the home screen into Google Search, mixing basic SMS with Google Hangouts or transferring G+ avatars in the Phone app)
  • Google Play Music can only play the first 69 minutes of “long” MP3s, WTF?!?

Still not sure:

  • Battery life on work days
  • The devices sturdiness
  • SMS in Google Hangouts

I’m so used to CyanogenMod by now that I miss several niceties it provides over the stock Android experience:

  • Getting the Notification Center or the Configuration Tiles depending on which side of the top bar you pull
  • Directly executing actions (e.g. turning WiFi on/off) by tapping Configuration Tiles
  • Making the device behave like an ordinary USB stick when connected to a PC
  • Having something like App Guard
  • Having the ability to give apps root (mainly for Helium, AdBlock Plus)
  • Superior music player
  • Auto-unlock when the PIN is correct

None the less, I’m happy. 🙂

Update:

Battery life seems fine, even after a day of moderate use.

CyanogenMod together with Open WhisperSystems just revealed secure messaging will be baked into CM. This will allow you to send encrypted messages to others through any SMS/messaging app. 🙂