mirror of
https://github.com/CoderSherlock/CoderSherlock.github.io.git
synced 2026-06-13 08:08:10 -07:00
297 lines
6.0 KiB
HTML
297 lines
6.0 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="description" content="">
|
|
<meta name="generator" content="Hugo 0.16" />
|
|
|
|
<title>Cross Compile RSync ARM · Mil años de solitario</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/pure-min.css">
|
|
|
|
<!--[if lte IE 8]>
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-old-ie-min.css">
|
|
<![endif]-->
|
|
<!--[if gt IE 8]><!-->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pure/0.6.0/grids-responsive-min.css">
|
|
<!--<![endif]-->
|
|
|
|
<!--[if lte IE 8]>
|
|
<link rel="stylesheet" href="/css/side-menu-old-ie.css">
|
|
<![endif]-->
|
|
<!--[if gt IE 8]><!-->
|
|
<link rel="stylesheet" href="/css/side-menu.css">
|
|
<!--<![endif]-->
|
|
|
|
<link rel="stylesheet" href="/css/blackburn.css">
|
|
|
|
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
|
|
|
|
|
|
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="shortcut icon" href="https://codersherlock.github.io/img/favicon.ico" type="image/x-icon" />
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<div id="layout">
|
|
|
|
|
|
<a href="#menu" id="menuLink" class="menu-link">
|
|
|
|
<span></span>
|
|
</a>
|
|
<div id="menu">
|
|
|
|
|
|
|
|
<div class="pure-menu">
|
|
<ul class="pure-menu-list">
|
|
|
|
|
|
<li class="pure-menu-item">
|
|
<a class="pure-menu-link" href="/"><i class='fa fa-home fa-fw'></i>Home</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="pure-menu-item">
|
|
<a class="pure-menu-link" href="/post/"><i class='fa fa-list fa-fw'></i>Posts</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="pure-menu-item">
|
|
<a class="pure-menu-link" href="/about/"><i class='fa fa-user fa-fw'></i>About</a>
|
|
|
|
</li>
|
|
|
|
|
|
<li class="pure-menu-item">
|
|
<a class="pure-menu-link" href="/contact/"><i class='fa fa-phone fa-fw'></i>Contact</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="pure-menu social">
|
|
<ul class="pure-menu-list">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
<div>
|
|
<div class="small-print">
|
|
<small></small>
|
|
</div>
|
|
<div class="small-print">
|
|
<small>Built with <a href="https://gohugo.io/" target="_blank">Hugo</a></small>
|
|
<small>Theme <a href="https://github.com/yoshiharuyamashita/blackburn" target="_blank">Blackburn</a></small>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
<div class="header">
|
|
<h1>Cross Compile RSync ARM</h1>
|
|
<h2></h2>
|
|
</div>
|
|
<div class="content">
|
|
|
|
<div class="post-meta">
|
|
|
|
<div>
|
|
<i class="fa fa-calendar fa-fw"></i>
|
|
<time>15 Aug 2016, 15:44</time>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div>
|
|
<i class="fa fa-tags fa-fw"></i>
|
|
|
|
<a class="post-taxonomy-tag" href="https://codersherlock.github.io/tags/android">android</a> /
|
|
|
|
<a class="post-taxonomy-tag" href="https://codersherlock.github.io/tags/arm">arm</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<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&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 "./ssh" {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>
|
|
|
|
|
|
|
|
<div class="prev-next-post pure-g">
|
|
<div class="pure-u-1-24" style="text-align: left;">
|
|
|
|
<a href="https://codersherlock.github.io/post/Pokemon-Go-Hack/"><i class="fa fa-chevron-left"></i></a>
|
|
|
|
</div>
|
|
<div class="pure-u-10-24">
|
|
|
|
<nav class="prev">
|
|
<a href="https://codersherlock.github.io/post/Pokemon-Go-Hack/">Pokemon Go Hack</a>
|
|
</nav>
|
|
|
|
</div>
|
|
<div class="pure-u-2-24">
|
|
|
|
</div>
|
|
<div class="pure-u-10-24">
|
|
|
|
</div>
|
|
<div class="pure-u-1-24" style="text-align: right;">
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<script src="https://codersherlock.github.io/js/ui.js"></script>
|
|
|
|
|
|
|
|
|
|
</body>
|
|
</html>
|
|
|