Compare commits

...

2 commits

Author SHA1 Message Date
b97e19b707 SHARKK 2026-01-28 14:12:23 +01:00
1376cf0e9c SHARKK 2026-01-28 14:10:27 +01:00
10 changed files with 87 additions and 12 deletions

View file

@ -126,8 +126,12 @@ id="toc-connecting-to-android-via-ssh">Connecting to Android via
ssh</a></li> ssh</a></li>
</ul></li> </ul></li>
<li><a href="#syncronising-files-with-rsync" <li><a href="#syncronising-files-with-rsync"
id="toc-syncronising-files-with-rsync">Syncronising files with id="toc-syncronising-files-with-rsync">Syncronising files with rsync</a>
rsync</a></li> <ul>
<li><a href="#refreshing-the-android-mediastore"
id="toc-refreshing-the-android-mediastore">Refreshing the Android
MediaStore</a></li>
</ul></li>
</ul> </ul>
</nav> </nav>
<article> <article>
@ -189,6 +193,25 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
rsync.</p> rsync.</p>
<div class="sourceCode" id="cb13"><pre <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">&quot;ssh -p 8022&quot;</span> ~/Music <span class="op">&lt;</span>username<span class="op">&gt;</span>@<span class="op">&lt;</span>ip_address<span class="op">&gt;</span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div> 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">&quot;ssh -p 8022&quot;</span> ~/Music <span class="op">&lt;</span>username<span class="op">&gt;</span>@<span class="op">&lt;</span>ip_address<span class="op">&gt;</span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div>
<h2 id="refreshing-the-android-mediastore">Refreshing the Android
MediaStore</h2>
<p>Android uses a Database to store files. In order to play your music,
this database needs to be refreshed. This can be achieved by a reboot or
by using adb to manually refresh it.</p>
<div class="sourceCode" id="cb14"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install adb</span></code></pre></div>
<p>Connect the Android device via USB and see if it is listed.</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> devices</span></code></pre></div>
<p>If it is, restart adb in TCP mode with port 5555</p>
<div class="sourceCode" id="cb16"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> tcpip 5555</span></code></pre></div>
<p>Connect to the device using its <ip_address>.</p>
<div class="sourceCode" id="cb17"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> connect <span class="op">&lt;</span>ip_address<span class="op">&gt;</span></span></code></pre></div>
<p>Refresh MediaStore.</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> shell am broadcast <span class="at">-a</span> android.intent.action.MEDIA_SCANNER_SCAN <span class="at">-d</span> file:///data/data/com.termux/files/home/storage/music/</span></code></pre></div>
</article> </article>
</section> </section>

View file

@ -96,3 +96,32 @@ Now on your Linux machine, syncronise your Music library with rsync.
```sh ```sh
rsync -av -e "ssh -p 8022" ~/Music <username>@<ip_address>:/data/data/com.termux/files/home/storage/music rsync -av -e "ssh -p 8022" ~/Music <username>@<ip_address>:/data/data/com.termux/files/home/storage/music
``` ```
## Refreshing the Android MediaStore
Android uses a Database to store files. In order to play your music, this database
needs to be refreshed. This can be achieved by a reboot or by using adb to manually
refresh it.
```sh
sudo dnf install adb
```
Connect the Android device via USB and see if it is listed.
```sh
adb devices
```
If it is, restart adb in TCP mode with port 5555
```sh
adb tcpip 5555
```
Connect to the device using its <ip_address>.
```sh
adb connect <ip_address>
```
Refresh MediaStore.
```sh
adb shell am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN -d file:///data/data/com.termux/files/home/storage/music/
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

BIN
images/shark-top-small.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
images/shark-top-small.xcf Normal file

Binary file not shown.

BIN
images/shark_top.xcf Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -126,8 +126,12 @@ id="toc-connecting-to-android-via-ssh">Connecting to Android via
ssh</a></li> ssh</a></li>
</ul></li> </ul></li>
<li><a href="#syncronising-files-with-rsync" <li><a href="#syncronising-files-with-rsync"
id="toc-syncronising-files-with-rsync">Syncronising files with id="toc-syncronising-files-with-rsync">Syncronising files with rsync</a>
rsync</a></li> <ul>
<li><a href="#refreshing-the-android-mediastore"
id="toc-refreshing-the-android-mediastore">Refreshing the Android
MediaStore</a></li>
</ul></li>
</ul> </ul>
</nav> </nav>
<article> <article>
@ -189,6 +193,25 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
rsync.</p> rsync.</p>
<div class="sourceCode" id="cb13"><pre <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">&quot;ssh -p 8022&quot;</span> ~/Music <span class="op">&lt;</span>username<span class="op">&gt;</span>@<span class="op">&lt;</span>ip_address<span class="op">&gt;</span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div> 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">&quot;ssh -p 8022&quot;</span> ~/Music <span class="op">&lt;</span>username<span class="op">&gt;</span>@<span class="op">&lt;</span>ip_address<span class="op">&gt;</span>:/data/data/com.termux/files/home/storage/music</span></code></pre></div>
<h2 id="refreshing-the-android-mediastore">Refreshing the Android
MediaStore</h2>
<p>Android uses a Database to store files. In order to play your music,
this database needs to be refreshed. This can be achieved by a reboot or
by using adb to manually refresh it.</p>
<div class="sourceCode" id="cb14"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb14-1"><a href="#cb14-1" aria-hidden="true" tabindex="-1"></a><span class="fu">sudo</span> dnf install adb</span></code></pre></div>
<p>Connect the Android device via USB and see if it is listed.</p>
<div class="sourceCode" id="cb15"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb15-1"><a href="#cb15-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> devices</span></code></pre></div>
<p>If it is, restart adb in TCP mode with port 5555</p>
<div class="sourceCode" id="cb16"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb16-1"><a href="#cb16-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> tcpip 5555</span></code></pre></div>
<p>Connect to the device using its <ip_address>.</p>
<div class="sourceCode" id="cb17"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb17-1"><a href="#cb17-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> connect <span class="op">&lt;</span>ip_address<span class="op">&gt;</span></span></code></pre></div>
<p>Refresh MediaStore.</p>
<div class="sourceCode" id="cb18"><pre
class="sourceCode sh"><code class="sourceCode bash"><span id="cb18-1"><a href="#cb18-1" aria-hidden="true" tabindex="-1"></a><span class="ex">adb</span> shell am broadcast <span class="at">-a</span> android.intent.action.MEDIA_SCANNER_SCAN <span class="at">-d</span> file:///data/data/com.termux/files/home/storage/music/</span></code></pre></div>
</article> </article>
</section> </section>

View file

@ -62,8 +62,8 @@ body {
justify-content: space-between; justify-content: space-between;
text-align: left; text-align: left;
border: 4pt ridge var(--border); border: 4pt ridge var(--border);
background: url("images/sand.png"); background: url("images/shark-top-small.png");
background-size: 25%; background-size: contain;
} }
#page-header li { #page-header li {
@ -122,8 +122,8 @@ body {
#page-footer { #page-footer {
border: 4pt ridge var(--border); border: 4pt ridge var(--border);
background: url("images/sand.png"); background: url("images/shark-top-small.png");
background-size: 25%; background-size: contain;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }

View file

@ -62,8 +62,8 @@ body {
justify-content: space-between; justify-content: space-between;
text-align: left; text-align: left;
border: 4pt ridge var(--border); border: 4pt ridge var(--border);
background: url("images/sand.png"); background: url("images/shark-top-small.png");
background-size: 25%; background-size: contain;
} }
#page-header li { #page-header li {
@ -122,8 +122,8 @@ body {
#page-footer { #page-footer {
border: 4pt ridge var(--border); border: 4pt ridge var(--border);
background: url("images/sand.png"); background: url("images/shark-top-small.png");
background-size: 25%; background-size: contain;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }