new rhythmbox android support


some quick news for rhythmbox and android fans.  Upstream have added better android support.

Previously, android support was via the MTP plugin and protocol.  As many users know – this old plugin has not really worked producing spurious errors, crashes and failed syncronisation of music.

Committed in the upstream code-sources is a new plugin and I’ve uploaded this for Trusty (14.04) users via my PPA (installation instructions here).

This new android support is built-in so you don’t need to manually enable this plugin.  If you use the MTP plugin for your other MTP devices this existing plugin can remain enabled – otherwise just disable the MTP plugin via the plugins menu.

This is brand new stuff – so report any issues upstream to get the necessary fixes into next version of rhythmbox – probably around mid september.

Other changes – I’ve made the visualizer plugin a suggested package not a dependency – its not a dependency upstream so I’m falling into line here.  If you want the visualizer plugin – install the rhythmbox-plugin-visualizer package

I’ve added the needed grilo packages to the dependency list to stop an annoying grilo error message appearing when you launch rhythmbox via a terminal.  N.B. Grilo packages support Jamendo as well as the upnp & DLNA protocols.

I’ve dropped the zeigeist plugin from the dependency list.  It has never worked since the migration to python3 via rhythmbox 3 due to zeitgeist not supporting python 3 upstream.  You can safely remove the rhythmbox-plugin-zeitgeist package now to tidy up.

Other notes – it looks like rhythmbox upstream may move to GTK+3.12 or later – this means no more support for Trusty users.  Nothing upstream has actually been committed yet – but if it does I’ll need to judge if I can still produce a trusty package by dropping those commits. Watch this space.

Advertisements

What do you do when your Android phone is not recognised by Ubuntu?


Panic!

Well maybe not – after you’ve finished cursing and threatening to go back to Windows – I would recommend you dig deep, rollup your sleeves and get creative…

TLDR; skip to the bottom and add my PPA to get the latest version of libmtp

My wife gave me a Vodafone Smart Turbo Android phone running Kitkat (v4.4) for Christmas and I’ve just got around to looking at its music capabilities.  First things first – adding some music to the phone.  Except my favourite music player – Rhythmbox nor Nautilus – refused to see the phone.

Rhythmbox, Nautilus – and many other music players in Linux use the underlying MTP library – libmtp to talk to modern Android phones & tablets.

In Trusty this is v1.1.6 – upstream the latest is v1.1.8 (at the time of writing)

Thus I took the vivid sources and rebuilt this on trusty.

However, this still did not work. Next visit was to the libmtp project. The key recommendation is to file a bug-report on their source tracker. They need the vendor ID and device ID of your phone. You get this by:

running lsusb
then plugin your phone and re-run lsusb

You should now see a new entry being listed:

for example:

foss@emachine:~$ lsusb
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0402:9665 ALi Corp. Gateway Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
foss@emachine:~$ lsusb
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 1ebf:7f29
Bus 001 Device 003: ID 0402:9665 ALi Corp. Gateway Webcam
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The new entry was 1ebf:7f29 – the vendor ID is the first part (1ebf) and the device ID is 7f29

That’s all well and good – but you’ll need to wait until someone does something with your bug report … and then you’ll need to wait until the next version of libmtp appears in some future version of Ubuntu.

Lets not wait…

On the project website it mentions that you can edit one of the source files – src/music-players.h

So lets create our own debian package. The easiest way to take someone elses pre-made package … mine for example


sudo add-apt-repository ppa:fossfreedom/libmtp
sudo apt-get update
apt-get source libmtp

Edit the music-players.h file


cd libmtp-1.1.8*/src
gedit music-players.h

Scroll to the end and add your new phone entry remembering to suffix a “,” to the end of the last line i.e.

{ “Isabella”, 0x0b20, “Her Prototype”, 0xddee, DEVICE_FLAG_NONE }

change to

{ “Isabella”, 0x0b20, “Her Prototype”, 0xddee, DEVICE_FLAG_NONE },
{ “YU Yureka”, 0x1ebf, “Vodafone smart turbo 4”, 0x7f29, DEVICE_FLAGS_ANDROID_BUGS }

where “YU Yureka” is the Vendor Name, 0x1ebf is your Vendor ID (prefixed with “0x”), “Vodafone smart turbo 4” is the Device description, 0x7f29 is the Device ID (prefixed with “0x”) and DEVICE_FLAGS_ANDROID_BUGS is the common flag because Android MTP is just full of bugs…

Save. Install the prerequisite packages:

sudo apt-get build-dep libmtp
sudo apt-get install devscripts build-essential libtool

Create your own patch for the package and compile:
dpkg-source --commit
debuild -us -uc

Note – if you see the following error:

configure.ac:14: error: required file ‘./ltmain.sh’ not found
configure.ac:5: installing ‘./missing’

Then copy the missing file and repeat the compilation:

cp /usr/share/libtool/config/ltmain.sh ./
debuild -us -uc

This will eventually create a series of Debian packages in the folder above libmtp-1.1.8*

Install the following packages – libmtp-common, libmtp-runtime & libmtp9, with the format sudo dpkg -i libmtp<packagename>

Too complicated? Maybe – but its worth learning the basics of compiling to understand what really goes into producing your favourite software.

Alternatively, find a friendly developer, beg/buy them a coffee and maybe they’ll add your phone to their package 😉


If you’ve skipped this far, install v1.1.8 of libmtp for Trusty (14.04) or Utopic (14.10) and cross your fingers that your phone is in this release:

sudo add-apt-repository ppa:fossfreedom/libmtp
sudo apt-get update && sudo apt-get upgrade

What was interesting examining the vivid package was that Canonical has added the new BQ Aquarius 4.5 Ubuntu Edition to this package. So I’ve included that also in my PPA.

Also, Canonical has added a new phone/phone like device to the vivid package

Description: Adding Arale device id (mtp and mtp+adb)
Forwarded: not-needed
Author: Ricardo Salveti de Araujo <ricardo.salveti@canonical.com>

This is the temporary id used by this device, once the final
one is in place, it’ll be forwarded to upstream.

I wonder what that is??