mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-13 08:08:10 -07:00
New_Post_Rsync
This commit is contained in:
+54
-1
@@ -6,9 +6,62 @@
|
||||
<description>Recent content in Posts on Mil años de solitario</description>
|
||||
<generator>Hugo -- gohugo.io</generator>
|
||||
<language>en-us</language>
|
||||
<lastBuildDate>Sat, 30 Jul 2016 18:10:20 -0400</lastBuildDate>
|
||||
<lastBuildDate>Mon, 15 Aug 2016 15:44:05 -0400</lastBuildDate>
|
||||
<atom:link href="https://CoderSherlock.github.io/post/index.xml" rel="self" type="application/rss+xml" />
|
||||
|
||||
<item>
|
||||
<title>Cross Compile RSync ARM</title>
|
||||
<link>https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/</link>
|
||||
<pubDate>Mon, 15 Aug 2016 15:44:05 -0400</pubDate>
|
||||
|
||||
<guid>https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/</guid>
|
||||
<description>
|
||||
|
||||
<h1 id="cross-compile-rsync-to-arm-platform">Cross Compile Rsync to ARM platform</h1>
|
||||
|
||||
<p>As always, feel free to ask. // Sherlock</p>
|
||||
|
||||
<h2 id="motivation">Motivation</h2>
|
||||
|
||||
<p>I got some issues about compile seafile to android, so instead of doing so, I start to figure out some other synchronize workflow. <a href="https://rsync.samba.org/">Rsync</a> is one of the most mature synchronization solution. So I made the decision on planting rsync to android.</p>
|
||||
|
||||
<h2 id="pre-work">Pre-work</h2>
|
||||
|
||||
<p>Rsync is a sync program with delta sync feature and based on SSH connection. So all we need to do is SSH support and cross compile tool-chain. Similar to what I mentioned in <a href="https://codersherlock.github.io/post/Cross-Compile-Seafile-2-ARM/">previews blog</a>, Android NDK and environment export need to be done before compilation.
|
||||
To enable normally use of compiled program, we need to make android support SSH. My solution is just install <a href="https://play.google.com/store/apps/details?id=berserker.android.apps.sshdroid&amp;hl=en">SSHDroid</a> from Google Play Store.</p>
|
||||
|
||||
<h2 id="cross-compile-rsync">Cross-Compile Rsync</h2>
|
||||
|
||||
<p>Running following script to build rsync. It will generate a executable file named rsync in the root directory.</p>
|
||||
|
||||
<pre><code>$ ./configure --build=${BUILD_SYS} --host=${TOOLCHAIN}
|
||||
$ make
|
||||
</code></pre>
|
||||
|
||||
<h2 id="push-rsync-to-android">Push RSync to Android.</h2>
|
||||
|
||||
<p>After installing SSHDroid, we can now push our arm-version-rsync to target machine.</p>
|
||||
|
||||
<pre><code>$ adb push rsync /data/local/tmp
|
||||
$ adb shell
|
||||
|
||||
# cd /data/data/berserker.android.apps.sshdroid/dropbear
|
||||
# mv ../../../local/tmp/rsync .
|
||||
</code></pre>
|
||||
|
||||
<h2 id="run-rsync-with-argument">Run Rsync with argument</h2>
|
||||
|
||||
<p>Now we can easily use rsync in android shell. Similar to what we use on PC.</p>
|
||||
|
||||
<pre><code># ./rsync -e &quot;./ssh&quot; {target-data} {target-location}:{target-directory}
|
||||
</code></pre>
|
||||
|
||||
<h2 id="references">References</h2>
|
||||
|
||||
<p><a href="http://stackoverflow.com/questions/8130889/build-rsync-for-android">Build Rsync for Android</a></p>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<title>Pokemon Go Hack</title>
|
||||
<link>https://codersherlock.github.io/post/Pokemon-Go-Hack/</link>
|
||||
|
||||
Reference in New Issue
Block a user