Build Rsync for Android

I downloaded rsync from http://rsync.samba.org/ does anyone know how to compile the source code for deployment on an Android device?

+6
source share
2 answers

You can compile without the NDK, assuming you are statically linking. This works for me on Ubuntu 13.04 Raring Ringtail.

Install the cross compiler:

sudo apt-get install gcc-arm-linux-gnueabi 

Download rsync:

 wget http://rsync.samba.org/ftp/rsync/rsync-3.0.9.tar.gz tar -zxv -f rsync-3.0.9.tar.gz cd rsync-3.0.9 

Compile using cross-compiler using static binding:

 ./configure --host=arm-linux-gnueabi CFLAGS="-static" make 

You will receive warnings in the lines Using X in statically linked applications requires at runtime the shared libraries from the glibc version used for linking . But so far rsync has worked for me.

And finally, install on your phone (assuming you are using SSHDroid):

 scp -P 2222 rsync root@ $PHONE_IP:/data/data/berserker.android.apps.sshdroid/dropbear 
+10
source

You will need the Android NDK to find it here. The web page has examples and downloads of how to compile C code for Android.

From the NDK Website:

NDK provides:

A set of tools and assembly files used to create custom code libraries from C and C ++ sources. A way to embed the corresponding native library in the application package file (.apk), which can be deployed on Android devices. A set of custom system headers and libraries that will be supported in all future versions of the Android platform, starting with Android 1.5. Applications that use their own actions should run on Android 2.3 or later. Documentation, Samples, and Tutorials

I also found this one if it is close to what you want to achieve.

0
source

Source: https://habr.com/ru/post/901477/


All Articles