New_Post_Rsync

This commit is contained in:
2016-08-15 20:15:07 -04:00
parent 9ee10ec287
commit f760a04d05
20 changed files with 793 additions and 5 deletions
+235
View File
@@ -0,0 +1,235 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="generator" content="Hugo 0.16" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<link rel='stylesheet' href='//fonts.googleapis.com/css?family=Open+Sans|Marcellus+SC'>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/solarized_dark.min.css">
<link rel="stylesheet" href="https://codersherlock.github.io/css/styles.css">
<link rel="stylesheet" href="https://codersherlock.github.io/css/custom.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="https://codersherlock.github.io//index.xml">
<title>Cross Compile RSync ARM - Mil años de solitario</title>
<meta property='og:title' content="Cross Compile RSync ARM - Mil años de solitario">
<meta property="og:type" content="article">
<meta property="og:url" content="https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/">
</head>
<body>
<header class="site">
<nav class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="https://codersherlock.github.io/">Mil años de solitario</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
</div>
</div>
</nav>
</header>
<div class="site">
<div class="container">
<div class="single">
<div class="row">
<div class="col-md-8">
<article class="single" itemscope="itemscope" itemtype="http://schema.org/Article">
<meta itemprop="mainEntityOfPage" itemType="https://schema.org/WebPage" content="https://codersherlock.github.io/"/>
<meta itemprop="dateModified" content="2016-08-15T15:44:05-04:00">
<meta itemprop="headline" content="Cross Compile RSync ARM">
<meta itemprop="description" content="Cross Compile Rsync to ARM platform As always, feel free to ask. // Sherlock Motivation I got some issues about compile seafile to android, so instead of doing so, I start to figure out some other synchronize workflow. Rsync is one of the most mature synchronization solution. So I made the decision on planting rsync to android. Pre-work Rsync is a sync program with delta sync feature and based on SSH connection.">
<meta itemprop="url" content="https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/">
<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="https://codersherlock.github.io/images/default.jpg" />
<meta itemprop="width" content="800">
<meta itemprop="height" content="800">
</div>
<div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
<div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
<meta itemprop="url" content="https://codersherlock.github.io/images/logo.jpg">
<meta itemprop="width" content="100">
<meta itemprop="height" content="100">
</div>
<meta itemprop="name" content="Mil años de solitario">
</div>
<div itemprop="author" itemscope itemtype="https://schema.org/Person">
<meta itemprop="name" content="">
</div>
<header class="article-header">
<time itemprop="datePublished" pubdate="pubdate" datetime="2016-08-15T15:44:05-04:00">Mon, Aug 15, 2016</time>
<h1 class="article-title">Cross Compile RSync ARM</h1>
</header>
<div class="article-body" itemprop="articleBody">
<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>
</div>
<aside>
<div class="section"><a href="https://codersherlock.github.io/tags/Android" class="tag">Android</a> <a href="https://codersherlock.github.io/tags/ARM" class="tag">ARM</a> </div>
<div class="section share">
<a href="http://www.facebook.com/sharer.php?src=bm&u=https%3a%2f%2fcodersherlock.github.io%2fpost%2fCross-Compile-RSync-ARM%2f&t=Cross%20Compile%20RSync%20ARM" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;"><i class="fa fa-facebook"></i></a>
<a href="http://twitter.com/intent/tweet?url=https%3a%2f%2fcodersherlock.github.io%2fpost%2fCross-Compile-RSync-ARM%2f&text=Cross%20Compile%20RSync%20ARM&tw_p=tweetbutton" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;"><i class="fa fa-twitter"></i></a>
<a href="https://plus.google.com/share?url=https%3a%2f%2fcodersherlock.github.io%2fpost%2fCross-Compile-RSync-ARM%2f" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;"><i class="fa fa-google-plus"></i></a>
<a href="http://getpocket.com/edit?url=https%3a%2f%2fcodersherlock.github.io%2fpost%2fCross-Compile-RSync-ARM%2f&title=Cross%20Compile%20RSync%20ARM" onclick="window.open(this.href, 'PCwindow', 'width=550, height=350, menubar=no, toolbar=no, scrollbars=yes'); return false;"><i class="fa fa-get-pocket"></i></a>
</div>
</aside>
</article>
</div>
<div class="col-md-4">
<aside class="site">
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">LatestPosts</h2>
</div>
<div class="list-group">
<a href="https://codersherlock.github.io/post/Cross-Compile-RSync-ARM/" class="list-group-item">Cross Compile RSync ARM</a>
<a href="https://codersherlock.github.io/post/Pokemon-Go-Hack/" class="list-group-item">Pokemon Go Hack</a>
<a href="https://codersherlock.github.io/post/Cross-Compile-Seafile-2-ARM/" class="list-group-item">Cross Compile Seafile 2 ARM</a>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">category</h2>
</div>
<div class="list-group">
<a href="https://codersherlock.github.io/categories/2016_07" class="list-group-item">2016_07</a>
<a href="https://codersherlock.github.io/categories/2016_08" class="list-group-item">2016_08</a>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">tag</h2>
</div>
<div class="list-group">
<a href="https://codersherlock.github.io/tags/android" class="list-group-item">android</a>
<a href="https://codersherlock.github.io/tags/arm" class="list-group-item">arm</a>
<a href="https://codersherlock.github.io/tags/github" class="list-group-item">github</a>
<a href="https://codersherlock.github.io/tags/hack" class="list-group-item">hack</a>
</div>
</div>
</aside>
</div>
</div>
</div>
</div>
</div>
<footer class="site">
<div class="container">
<p>&copy; 2016 Mil años de solitario</p>
<p>Powered by <a href="http://gohugo.io" target="_blank" rel="nofollow">Hugo</a>, Theme <a href="https://github.com/dim0627/hugo_theme_beg" target="_blank" rel="nofollow">beg</a> designed by <a href="http://yet.unresolved.xyz" target="_blank" rel="nofollow">Daisuke Tsuji</a></p>
</div>
</footer>
<script src="//code.jquery.com/jquery-2.2.1.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>