The New Technologies Canonical Created for Ubuntu Phone

303

ubuntu phone

The year 2015 is certainly going to be an exciting year for Linux in the consumer space. Google is coming out with a brand new class of devices powered by Chrome OS and Canonical, one of the few Linux companies still interested in the Linux desktop, saw its first commercially available Ubuntu phone, the BQ Aquaris E4.5, hit Europe last week.

From among all the open source players active in the mobile space, Canonical’s Ubuntu seems to offer an experience closest to the ‘GNU’ and Linux experience.

Canonical has developed many new technologies to ensure its mobile dreams see the light of day. At the same time, the company has re-used much of the work done by the open source community. That’s the whole point of Linux and Open Source: reuse when you can, and create when you must.

Here are some of the features that set Canonical’s new Ubuntu phones apart.

Is it a Linux phone?

First of all, people tend to discredit Chrome OS or Android as Linux soperating systems (OS). In my opinion that’s plain wrong. Linux is just the kernel and any OS powered by Linux is a Linux OS. As Greg Kroah-Hartman once told me, ‘Linux’ is just a kernel, everything else is just “fluff.”

There are two major factors that make the Ubuntu phone unique and set it apart from the rest. First of all, unlike other open source mobile platforms, there are no proprietary components in the Ubuntu phone, sans the binary blobs and device drivers which the hardware makers won’t open source. The second being the fact that Ubuntu phones expose their guts, letting users talk to them just the way we talk to any ‘Linux’ system.

However before you get too excited, keep in mind that the Ubuntu phone uses different technologies (for now) than the Ubuntu desktop. You can simply open the terminal and install apps with the majestic ‘apt-get’, but it is not recommended.

Michael Hall, a Canonical developer, elaborated on why users should avoid running apt-get on their Ubuntu phones. He told me, “You can only have one thing managing the system installation. By default on the phone this is the image-based updates. If you enable and start using apt-get to manage the system, you have to give that up. This has nothing to do with Click packages, btw, which will happily work with either an image-based or apt-get managed system.” (See below for more on Click packages.)

That doesn’t mean you are locked out of all good GNU user-land tools. Many developers are working on writing such tools for Ubuntu phones. When I asked about ‘terminal’, the most powerful tool in Linux-land, Alan Pope, another Canonical developer, said, “Yes, there is a community-maintained terminal app which is in the store.”

The Terminal was originally developed by Dmitry Zagnoyko but his work was interrupted due to Russia-Ukraine conflict. He had to stop working on the application and that’s when another developer Filippo Scognamiglio took over and practically re-wrote the app.

The rest of the ‘Linux’ apps are not far from the reach of a user. Hall adds, “You will also have the traditional GNU userland tools available in the shell, rather than the Android ones. Sudo also works out of the box, no need to ‘root’ anything.”

What’s in the box?

Ubuntu phones come with a large set of apps pre-installed. Almost all of these apps were created exclusively for Ubuntu Phones. A majority of these apps were developed by Canonical and the rest are being created and maintained by the community.

There is no standard set of pre-installed apps. Talking about pre-installed apps Pope says, “It depends on what phone and image you have, and they’re not all clear-cut – e.g. web browser is a “Canonical” app but has contributions from community people. Calendar is a “community” app but has contributions from Canonical people.”

The BQ phone ships with Telegram, Phone, messaging, contacts, camera, browser, media-player, gallery, System settings, indicators, Cut The Rope Free, etc. The phone also comes with apps that are developed by the community which include: Music, Clock, Calculator, Tagger, PathWind, and Reminders.

Since BQ is targeting the average consumer (however I doubt that an average user buys phones through random flash sales), the phones don’t come pre-installed with some of the most interesting apps such as Terminal and File Manager.

It’s quite obvious that major players are not going to write apps for a new and relatively smaller platform like Ubuntu. To address this issue Canonical introduced the concept of ‘Web Apps‘. It was in a nutshell integration of the web services, such as Gmail, with the OS through a browser. They are still websites running inside a browser, but with deeper OS integration . Some of these apps include: Facebook, eBay, Amazon, Twitter, HERE, Gmail, El Pais, Cinco Dias.

Is there any scope for Ubuntu’s success?

In addition to Web Apps, Canonical created another workaround to fill the gigantic ‘app-gap’. Instead of creating grids of apps to access different services or content, they created Scopes. Traditionally you open an app such as YouTube or Pandora then search for the desired track. In the Ubuntu Phone you start off with the content and then choose the right app for that media type.

There are two types of Scopes: aggregated and branded. Today, NearBy, Music, Videos and Photo are aggregated Scopes that collect the content from other scopes, often by media type. Then there are branded scopes which source content from the actual services such as YouTube or Vimeo. Users can search content directly by brand or by feed it to an aggregated scope, such as Video.

Ubuntu phone app organization

Display of their own technologies

Besides apps and scopes, Canonical has developed many new technologies for the Ubuntu phone. The company developed its own display server Mir for the phone (and they also plan to use it on the desktop eventually).

Since a lot of ink has already been wasted on Mir vs. Wayland I am not going to waste more time on it. There might have been many reasons why Canonical developed some of its own stack when alternatives were available. It may have needed more control over the development of the stack to ready the OS for partners. At the same time it might have sounded easier to build their own solution to address their problem in timely manner, instead of having to spend time in persuading other projects to add the features they needed.

As Pope explained, “We needed all the apps listed above for a minimum viable product, and all the necessary support libraries to make that happen. For example, media player was needed for playing videos via Gstreamer on top of Mir, mediascanner for finding metadata about media on devices, media-hub for playing audio in the background.”

Is the phone market just a click away?

One of the most exciting technologies being used by Ubuntu phones is Click – a new app packaging format aimed at making life easier for developers. And I am assuming that it would take a much bigger role on the Ubuntu desktop. (See our earlier coverage: Can Ubuntu Click Address Linus Torvalds’ Binary Problems?)

Pope says, “Click is a cut-down Debian package. They’re easier to make, easier to distribute and deploy. Along with apparmor, click packages are confined so they can’t access data from other applications or directories without user confirmation.”

Canonical has also created a Click Store to further make the lives of users and developers easier while keeping Ubuntu secure.

Hall says, “The Click format and tools themselves don’t provide runtime confinement, only install-time confinement (they make sure one click’s installation won’t change another click’s installation or the system). It’s the Click store that provides you the runtime confinement, and it does this by only publishing apps that are run under a safe AppArmor profile (there are whitelisted exceptions to this rule for things like Terminal and File Manager, but not many). So side-loaded Click apps, or Click apps from an alternative store, aren’t guaranteed to be confined.”

In addition to this there is Unity 8, which is being developed for Ubuntu Touch and will also succeed Unity 7 on the desktop. Other new technologies that they developed include Dash, indicators and Tool kits.

Are they suffering from NIH syndrome?

It’s a tricky situation for any open source company. Especially when your software is going to deal with new hardware. You have to choose between existing open source solutions or creating new ones.

It’s a gift and it’s a curse.

At times it may be more challenging and difficult to work with an existing project to make changes that you need, and to add features that you require. That too in a timely manner because the product has to go on sale.

At times it could become excessively time consuming to sort out differences and get your features incorporated with an existing project; to an extent that it no longer remains a technical endeavor to deliver the code in time; It becomes a political debate.

That’s when companies like Canonical choose to chalk out their own solutions.

Reinventing the wheel?

That said, Canonical is not re-inventing the wheel with every single component of the phone. They are reusing a lot of technologies. It keeps the cost of development low and at the same time helps those projects with additional contributions which come with new users.

There is a very long list of such technologies being used in Ubuntu phones. Pope pointed out some of the core components of Ubuntu phone where they are using the existing open source technologies.The list includes: Linux, cgroups, lxc, AppArmor, dbus, gsettings, apt/dpkg (used to build the system images) Qt, Android, Hybris, Maliit, Evolution-data-server, bluez, plus many of the usual desktop pieces like pulseaudio, systemd, upstart, network manager, gstreamer, telepathy, ofono, cordova, etc.

Conclusion

It seems Canonical is working in a typical open source manner. They are carefully picking what to create or what to reuse. When you are the anvil, bear – when you are the hammer, strike. Finally they have started to deliver.

And that’s what matters in the end. It’s all well as long as it’s open source.