switch to atom feed
This commit is contained in:
parent
6ab972d65e
commit
ff76559ab7
28 changed files with 906 additions and 1751 deletions
|
|
@ -2,16 +2,16 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="" >
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta name="author" content="Never" />
|
||||
<meta name="dcterms.date" content="2026-01-12" />
|
||||
<title>Using rsync on Android to syncronise my Music library</title>
|
||||
<link rel="icon" type="image/x-icon" href="images/favicon.png">
|
||||
<link rel="alternate" type="application/rss+xml" title="nevereverever.de" href="https://nevereverever.de/eh/eh/eh/eh-eh/rss.xml">
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<meta name="author" content="Never" />
|
||||
<meta name="dcterms.date" content="2026-01-12" />
|
||||
<title>Using rsync on Android to syncronise my Music library</title>
|
||||
<link rel="icon" type="image/x-icon" href="images/favicon.png">
|
||||
<link rel="alternate" type="application/atom+xml" title="nevereverever.de" href="https://nevereverever.de/eh/eh/eh/eh-eh/atom.xml">
|
||||
<style>
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||
div.column{flex: auto; overflow-x: auto;}
|
||||
|
|
@ -92,61 +92,69 @@ code span.st { color: #2aa198; } /* String */
|
|||
code span.va { color: #cb4b16; } /* Variable */
|
||||
code span.vs { color: #dc322f; } /* VerbatimString */
|
||||
code span.wa { color: #b58900; } /* Warning */
|
||||
</style>
|
||||
<link rel="stylesheet" href="styles/style.css">
|
||||
</head>
|
||||
</style>
|
||||
<link rel="stylesheet" href="styles/style.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<img id="shork" src="images/shork.png"></img>
|
||||
<header id="page-header">
|
||||
<a class="page-header-button" href="index.html">Home</a>
|
||||
<a class="rss-button" href="rss.xml">RSS Feed</a>
|
||||
</header>
|
||||
<main id="page">
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Using rsync on Android to syncronise my Music
|
||||
library</h1>
|
||||
<p class="author">Never</p>
|
||||
<p class="date">2026-01-12</p>
|
||||
</header>
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<ul>
|
||||
<li><a href="#setup-termux" id="toc-setup-termux">Setup Termux</a></li>
|
||||
<li><a href="#establishing-an-ssh-connection"
|
||||
id="toc-establishing-an-ssh-connection">Establishing an ssh
|
||||
connection</a>
|
||||
<ul>
|
||||
<li><a href="#configuring-android"
|
||||
id="toc-configuring-android">Configuring Android</a></li>
|
||||
<li><a href="#connecting-to-android-via-ssh"
|
||||
id="toc-connecting-to-android-via-ssh">Connecting to Android via
|
||||
ssh</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#syncronising-files-with-rsync"
|
||||
id="toc-syncronising-files-with-rsync">Syncronising files with
|
||||
rsync</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article>
|
||||
<h1 id="setup-termux">Setup Termux</h1>
|
||||
<p>Install Termux using F-Droid.</p>
|
||||
<p>Update software repos.</p>
|
||||
<div class="sourceCode" id="cb1"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> update</span></code></pre></div>
|
||||
<p>Grant file access permissions using.</p>
|
||||
<div class="sourceCode" id="cb2"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">termux-setup-storage</span></span></code></pre></div>
|
||||
<h1 id="establishing-an-ssh-connection">Establishing an ssh
|
||||
connection</h1>
|
||||
<p>If network (such as eduroam) is blocking ssh trafic between machines,
|
||||
open a Wi-Fi Hotspot on your Linux machine and connect the Android
|
||||
device to it before using <code>rsync</code> or <code>ssh</code>.</p>
|
||||
<h2 id="configuring-android">Configuring Android</h2>
|
||||
<p>Install the openssh server on Termux.</p>
|
||||
<div class="sourceCode" id="cb3"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> install openssh</span></code></pre></div>
|
||||
<p>Start the ssh server daemon.</p>
|
||||
<div class="sourceCode" id="cb4"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">sshd</span></span></code></pre></div>
|
||||
<p>Get the ip address of the Android machine (in the Hotspot).</p>
|
||||
<div class="sourceCode" id="cb5"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ifconfig</span></span></code></pre></div>
|
||||
<pre><code>Warning: cannot open /proc/net/dev (Permission denied). Limited output.
|
||||
<img id="shork" src="images/shork.png"></img>
|
||||
<header id="page-header">
|
||||
<a class="page-header-button" href="index.html">Home</a>
|
||||
<a class="rss-button" href="atom.xml">Atom Feed</a>
|
||||
</header>
|
||||
<main id="page">
|
||||
<header id="title-block-header">
|
||||
<h1 class="title">Using rsync on Android to syncronise my
|
||||
Music library</h1>
|
||||
<p class="author">Never</p>
|
||||
<p class="date">2026-01-12</p>
|
||||
</header>
|
||||
<nav id="TOC" role="doc-toc">
|
||||
<ul>
|
||||
<li><a href="#setup-termux" id="toc-setup-termux">Setup
|
||||
Termux</a></li>
|
||||
<li><a href="#establishing-an-ssh-connection"
|
||||
id="toc-establishing-an-ssh-connection">Establishing an ssh
|
||||
connection</a>
|
||||
<ul>
|
||||
<li><a href="#configuring-android"
|
||||
id="toc-configuring-android">Configuring Android</a></li>
|
||||
<li><a href="#connecting-to-android-via-ssh"
|
||||
id="toc-connecting-to-android-via-ssh">Connecting to Android
|
||||
via ssh</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#syncronising-files-with-rsync"
|
||||
id="toc-syncronising-files-with-rsync">Syncronising files
|
||||
with rsync</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<article>
|
||||
<h1 id="setup-termux">Setup Termux</h1>
|
||||
<p>Install Termux using F-Droid.</p>
|
||||
<p>Update software repos.</p>
|
||||
<div class="sourceCode" id="cb1"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> update</span></code></pre></div>
|
||||
<p>Grant file access permissions using.</p>
|
||||
<div class="sourceCode" id="cb2"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="ex">termux-setup-storage</span></span></code></pre></div>
|
||||
<h1 id="establishing-an-ssh-connection">Establishing an ssh
|
||||
connection</h1>
|
||||
<p>If network (such as eduroam) is blocking ssh trafic
|
||||
between machines, open a Wi-Fi Hotspot on your Linux machine
|
||||
and connect the Android device to it before using
|
||||
<code>rsync</code> or <code>ssh</code>.</p>
|
||||
<h2 id="configuring-android">Configuring Android</h2>
|
||||
<p>Install the openssh server on Termux.</p>
|
||||
<div class="sourceCode" id="cb3"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> install openssh</span></code></pre></div>
|
||||
<p>Start the ssh server daemon.</p>
|
||||
<div class="sourceCode" id="cb4"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="ex">sshd</span></span></code></pre></div>
|
||||
<p>Get the ip address of the Android machine (in the
|
||||
Hotspot).</p>
|
||||
<div class="sourceCode" id="cb5"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ifconfig</span></span></code></pre></div>
|
||||
<pre><code>Warning: cannot open /proc/net/dev (Permission denied). Limited output.
|
||||
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
|
||||
inet 127.0.0.1 netmask 255.0.0.0
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
|
||||
|
|
@ -158,46 +166,49 @@ rmnet0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1280
|
|||
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
|
||||
inet 10.42.0.200 netmask 255.255.255.0 broadcast 10.42.0.210
|
||||
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)</code></pre>
|
||||
<p>In this case 10.42.0.200.</p>
|
||||
<p>The ssh server should now be running and listening on port 8022. You
|
||||
can check by running</p>
|
||||
<div class="sourceCode" id="cb7"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">nmap</span> <span class="at">-Pn</span> <span class="op"><</span>ip_address<span class="op">></span></span></code></pre></div>
|
||||
<p>For me <code><ip_address></code> whould be 10.42.0.200.</p>
|
||||
<p>Get the username.</p>
|
||||
<div class="sourceCode" id="cb8"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">whoami</span></span></code></pre></div>
|
||||
<pre><code>u0_a700</code></pre>
|
||||
<p>Set a password for this user.</p>
|
||||
<div class="sourceCode" id="cb10"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">passwd</span></span></code></pre></div>
|
||||
<h2 id="connecting-to-android-via-ssh">Connecting to Android via
|
||||
ssh</h2>
|
||||
<p>Make sure you have an ssh key pair on the Linux system. If not
|
||||
generate one using <code>ssh-keygen</code>.</p>
|
||||
<p>Now connect to Android by <code>ssh</code>.</p>
|
||||
<div class="sourceCode" id="cb11"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ssh</span> <span class="op"><</span>username<span class="op">></span>@<span class="op"><</span>ip_address<span class="op">></span> -p 8022</span></code></pre></div>
|
||||
<h1 id="syncronising-files-with-rsync">Syncronising files with
|
||||
rsync</h1>
|
||||
<p>Install <code>rsync</code> on Termux and Linux. Make sure to keep
|
||||
your own openssl config.</p>
|
||||
<div class="sourceCode" id="cb12"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> install rsync</span></code></pre></div>
|
||||
<p>Now on your Linux machine, syncronise your Music library with
|
||||
rsync.</p>
|
||||
<div class="sourceCode" id="cb13"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rsync</span> <span class="at">-av</span> <span class="at">-e</span> <span class="st">"ssh -p 8022"</span> ~/Music <span class="op"><</span>username<span class="op">></span>@<span class="op"><</span>ip_address<span class="op">></span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div>
|
||||
</article>
|
||||
</main>
|
||||
<footer id="page-footer">
|
||||
<nav id="webring">
|
||||
<a href="https://cups.teabucket.eu/prev?from=never" target="_parent"><img alt="Previous"
|
||||
src="images/cups_left_dark.svg" width="30" height="30"></a>
|
||||
<a href="https://cups.teabucket.eu/" target="_parent"><img alt="CUPS" src="images/cups_logo_dark.svg"
|
||||
width="120" height="60"></a>
|
||||
<a href="https://cups.teabucket.eu/next?from=never" target="_parent"><img alt="Next"
|
||||
src="images/cups_right_dark.svg" width="30" height="30"></a>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
<p>In this case 10.42.0.200.</p>
|
||||
<p>The ssh server should now be running and listening on
|
||||
port 8022. You can check by running</p>
|
||||
<div class="sourceCode" id="cb7"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true" tabindex="-1"></a><span class="fu">nmap</span> <span class="at">-Pn</span> <span class="op"><</span>ip_address<span class="op">></span></span></code></pre></div>
|
||||
<p>For me <code><ip_address></code> whould be
|
||||
10.42.0.200.</p>
|
||||
<p>Get the username.</p>
|
||||
<div class="sourceCode" id="cb8"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true" tabindex="-1"></a><span class="fu">whoami</span></span></code></pre></div>
|
||||
<pre><code>u0_a700</code></pre>
|
||||
<p>Set a password for this user.</p>
|
||||
<div class="sourceCode" id="cb10"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true" tabindex="-1"></a><span class="fu">passwd</span></span></code></pre></div>
|
||||
<h2 id="connecting-to-android-via-ssh">Connecting to Android
|
||||
via ssh</h2>
|
||||
<p>Make sure you have an ssh key pair on the Linux system.
|
||||
If not generate one using <code>ssh-keygen</code>.</p>
|
||||
<p>Now connect to Android by <code>ssh</code>.</p>
|
||||
<div class="sourceCode" id="cb11"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">ssh</span> <span class="op"><</span>username<span class="op">></span>@<span class="op"><</span>ip_address<span class="op">></span> -p 8022</span></code></pre></div>
|
||||
<h1 id="syncronising-files-with-rsync">Syncronising files
|
||||
with rsync</h1>
|
||||
<p>Install <code>rsync</code> on Termux and Linux. Make sure
|
||||
to keep your own openssl config.</p>
|
||||
<div class="sourceCode" id="cb12"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true" tabindex="-1"></a><span class="ex">pkg</span> install rsync</span></code></pre></div>
|
||||
<p>Now on your Linux machine, syncronise your Music library
|
||||
with rsync.</p>
|
||||
<div class="sourceCode" id="cb13"><pre
|
||||
class="sourceCode sh"><code class="sourceCode bash"><span id="cb13-1"><a href="#cb13-1" aria-hidden="true" tabindex="-1"></a><span class="fu">rsync</span> <span class="at">-av</span> <span class="at">-e</span> <span class="st">"ssh -p 8022"</span> ~/Music <span class="op"><</span>username<span class="op">></span>@<span class="op"><</span>ip_address<span class="op">></span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div>
|
||||
</article>
|
||||
</main>
|
||||
<footer id="page-footer">
|
||||
<nav id="webring">
|
||||
<a href="https://cups.teabucket.eu/prev?from=never" target="_parent"><img alt="Previous"
|
||||
src="images/cups_left_dark.svg" width="30" height="30"></a>
|
||||
<a href="https://cups.teabucket.eu/" target="_parent"><img alt="CUPS" src="images/cups_logo_dark.svg"
|
||||
width="120" height="60"></a>
|
||||
<a href="https://cups.teabucket.eu/next?from=never" target="_parent"><img alt="Next"
|
||||
src="images/cups_right_dark.svg" width="30" height="30"></a>
|
||||
</nav>
|
||||
</footer>
|
||||
</body>
|
||||
<script src="scripts/shork.js"></script>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue