Compare commits

..

No commits in common. "b97e19b70791b1daa6f1d24ac1ab4f099074a90b" and "50caf6c6f3866f9db50e8f39c2d4a66d6d888027" have entirely different histories.

10 changed files with 12 additions and 87 deletions

View file

@ -126,12 +126,8 @@ 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>
<ul>
<li><a href="#refreshing-the-android-mediastore"
id="toc-refreshing-the-android-mediastore">Refreshing the Android
MediaStore</a></li>
</ul></li>
id="toc-syncronising-files-with-rsync">Syncronising files with
rsync</a></li>
</ul>
</nav>
<article>
@ -193,25 +189,6 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
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">&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>
</section>

View file

@ -96,32 +96,3 @@ Now on your Linux machine, syncronise your Music library with rsync.
```sh
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/
```

BIN
dvd-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

View file

@ -126,12 +126,8 @@ 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>
<ul>
<li><a href="#refreshing-the-android-mediastore"
id="toc-refreshing-the-android-mediastore">Refreshing the Android
MediaStore</a></li>
</ul></li>
id="toc-syncronising-files-with-rsync">Syncronising files with
rsync</a></li>
</ul>
</nav>
<article>
@ -193,25 +189,6 @@ class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#
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">&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>
</section>

View file

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

View file

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