using mpd to upload music to your android

I own an android smartphone and I’m a mpd user.

Using mpddroid, sshdroid and ubunturemote app I found a way to upload playlists from my mpd to my android. This way you can use your mpd to organize music on your android

I’m using Ubuntu Remote Control to admin my NAS. Ubuntu Remote Control is actually not limited to Ubuntu. You can use it to control every very Linux machine. So far this is the only app I found which has wake on LAN functionality included. Another aspect of the app I like is the ability to define custom commands and bin icons to them.

You can find Ubuntu Remote Control here

Ubuntu Remote Control on google play store

For my scripts to work you also need sshdroid. sshdroid is app which alows you to connect via ssh on your android. Even it is (like mine) not rooted. You can find sshdroid here:

sshdroid on google play store

For sshdroid to work you need to enable login via ssh-keys.

So ssh on your nas and run:


ssh-copy-id “root@ -p 2222”

where is the IP of your android device. I configured “static” IP for my android via my router as I don’t know any other way to do that on an none rooted android. You can also use your router to find out the local IP of your device.

once you did that you can test the setup via:

ssh root@ -p 2222

if that works you can go on writing some scripts.

This scripts copys the current played track to your android device

# copy current played track on mpd to android device
# simple shortcut to copy files to an android device running sshdroid
# sshdroid needs to be configured with ssh-key authentification
# username is root
file=`mpc -f %file% | head -n 1`
scp -P 2222 “$path” root@
echo “finished transfering files to android device”

And Here is a script to copy a playlist to your android device


while read line
scp -P 2222 “$line” root@
done </var/lib/mpd/playlists/android.m3u


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s