【发布时间】:2011-12-29 04:12:22
【问题描述】:
我已经从http://rsync.samba.org/下载了rsync 有谁知道如何编译要部署在 Android 设备中的源代码?
【问题讨论】:
我已经从http://rsync.samba.org/下载了rsync 有谁知道如何编译要部署在 Android 设备中的源代码?
【问题讨论】:
假设您静态链接,您可以在没有 NDK 的情况下进行编译。这适用于 Ubuntu 13.04 Raring Ringtail。
安装交叉编译器:
sudo apt-get install gcc-arm-linux-gnueabi
下载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
用交叉编译器编译,使用静态链接:
./configure --host=arm-linux-gnueabi CFLAGS="-static"
make
您会收到一些类似于Using X in statically linked applications requires at runtime the shared libraries from the glibc version used for linking 的警告。但到目前为止,rsync 对我有用。
最后,安装到您的手机(假设您使用的是 SSHDroid):
scp -P 2222 rsync root@$PHONE_IP:/data/data/berserker.android.apps.sshdroid/dropbear
【讨论】:
【讨论】: