Image based updates for Ubuntu Touch

Stéphane Graber stgraber at
Thu Apr 18 09:48:00 UTC 2013


I initially wanted to send just a short e-mail on the subject of Image
based updates for our mobile devices, but it evolved into something far
longer. Hopefully I managed to make it readable ;)

== Context ==
Some may remember the session on image based updates from the last vUDS.
We discussed how we'd like the phones and tablets to update and how
different this would have to be from regular APT based updates to meet
some of the new requirements that come with those platforms.

vUDS session:

== Current work ==
Since UDS, I've been talking with quite a few people about that subject
and we've come up with a rather detailed plan which we are now prototyping.

The details of that plan can be found at:

This is a rather lengthy spec that tries to cover how we're planning on
updating those devices keeping in mind that some will be updated by the
carrier/OEM and some will be updated by us.

This spec is still evolving as we find new issues so please don't
hesitate to get in touch with me if you feel we overlooked something or
you have questions about some specific bits.

== Presentation ==
Last Friday we had an Hangout On Air with Daniel Holbach and most of the
people involved in the image based update design so far. This covers the
spec itself and some more details on the various prototypes we're
working on.

The recording may be found here:

== Quick intro ==
The overall design can be split into 3 pieces:
 - The update server which contains all the various Ubuntu rootfs images
and Android images for the various supported devices and placed into
update "channels" (that vary in stability and update frequency).
The server code is also responsible for generating the diffs between
images and generating the final zip files that are used by the upgrader.

 - The update client connects to the update server and base on the
current version on the device, the update channel and the amount of
available disk space, resolves the best upgrade path that can fit in the
device's memory. After validating all the files, it reboots the device
into recovery mode.

 - The upgrader sits in the recovery partition and when triggered scans
for any update that was downloaded by the update client, validates the
file signatures, then apply all the updates sequentially directly on top
of the current rootfs. When done, it reboots the device into standard mode.

The updates themselves are currently a squashfs, a list of files to
remove and an update script stored into a zip file. The current server
implementation doesn't use GPG yet, but will in the next couple of days
(the indexes will be signed and so will the content of the zip files).

The rootfs on the device is a read-only ext4 partition on top of which
we basically apply either full updates (wipe everything and unpack a
clean image) or apply a diff (copy a bunch of files, remove some others).
In the current version of the spec, anyone who opts to move to
read/write and directly use apt-get/dpkg won't be able to use image
based updates afterwards and will have to directly use apt-get on the

== Prototype ==
I'm currently working on a prototype server which is available at:

Barry is working on an initial client that'll get the right data from
the server, calculate an upgrade path, then download and validate the
various bits.

Finally, Ondrej is looking into the actual upgrader which will live in
the recovery ROM and do the final unpacking, validation and application
of the updates.

== Timeline ==
We're hoping to have a fully working prototype of the whole solution in
the next week or so which we'll then try to integrate within the
existing Touch images.

Additional work to support full convergence mode (running Ubuntu desktop
from an Ubuntu touch device) is also on the map but isn't scheduled for
the initial iteration (October) so we still have time to figure out what
to do there.
Some initial thoughts on the topic can be found at:

== Getting involved ==
So as I mentioned, the different people involved in the implementation are:
 - Client side: Barry Warsaw
 - Upgrader/recovery ROM: Ondrej Kubik
 - Server side: Stéphane Graber

If you want to help, you can directly get in touch with us.
If you have comments on the spec as a whole, then simply reply to this
e-mail or get in touch with me.

I'm trying to keep the wiki as up to date as I can without getting into
too small details that'd make it even harder to read than it currently
is, however I'm planning on creating a few more wiki pages to detail the
way the client/updater/server each work.

Stéphane Graber
Ubuntu developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the ubuntu-devel mailing list