Canonical Voices

What I me mine talks about

Posts tagged with 'ubuntu'

Here's how I build and test click packages on the target devices, note that this only works for packages that don't need to be compiled from their own sources:

tool_path=
# e.g.; branch=lp:dropping-letters
branch=
# e.g.; click_package=com.ubuntu.dropping-letters
click_package=
# e.g.; test=dropping_letters
test=

bzr branch lp:~sergiusens/+junk/click_ready $tool_path

bzr branch $branch branch
cd branch
$tool_path/click-build.py --bzr-source $branch

adb push *.click /tmp
adb shell 'sudo -u phablet pkcon install-local *.click'
# this may require lp:phablet-tools
phablet-tools autopilot --dbus-probe enable

phablet-click-test-setup --click $click_package

phablet-test-run $test

I hope to make this a bzr plugin to avoid all these instructions. For certain we need to have a session at the upcoming session to discuss better testing strategies that would satisfy testing:

  • On production images.
  • Staying in readonly.
  • Adding test dependencies.
  • Best way to bundle tests for click.
  • Best ways to provide testing tools not included in the images.

The tools suffice for the moment but this can be made more elegant.

Read more

In the recent images, starting the 20130813.1, you will notice that click packages have started to show up on the built images. That is, from a user perspective you would probably not notice at all, but if you dive into the system, you will.

What and how it is built

Currently, all the packages for the Core Community Apps are being built as click packages, as these are the easiest since are binary independent.

The click packages are built on jenkins, you can take a look at the sudoku-app. These are built in some dynamic form with a click-readiness.py tool that basically reads out the current debian packaging from the sources and builds out a manifest and puts everything in a staged location on which we just run click build.

Since there is no concept of a PPA for a click package they are provisioned on one of the Canonical Servers that can be found here.

What's installed

While all of the click packages could be installed on the image, we are only installing 3:

  • dropping letters.
  • sudoku.
  • stock ticker.

The installation is done from a hook in livecd-rootfs which installs them as the phablet user in order for you to enjoy them on the install.

The list of packages to install is today sort of hardcoded in click_list which is built out by click_copy.py. Any new addtions, to this date will come from here.

What happens when a click package is installed

When you install a click package you need to target a user, a click package with no hooks would just lay it out plainly. A click package manifest with hooks will trigger certain actions upon installation, today there are two important ones:

  • security hook: this creates the apparmor profile for the app to run under confinement, these land in /var/lib/apparmor/profiles/.
  • desktop hook: this is a user hook, which basically provisions a desktop file modified for confinement and with the actual path to where the application lives, this lands in ~/.local/share/applications. The target is to have unity8 not use the desktop files but to eventually launch them through upstart.

To see the click packages installed for your user (phablet), just run click list. If you want to see the manifests for these click packages just run click list --manifest

Where to get more info?

There's isn't much lying around, but Colin has made info available on readthedocs, with regards to security, a good starting point is the security team's wiki.

Read more

I've been refactoring phablet-flash a bit, well more than a bit...

The major change from a user interface perspective is that, as the tool was losing it's simplicity, maintaining it with a big options list had become a pain, so welcome the positional arguments where each of these arguments is a provisioning type.

With a comment from Ricardo I have decided to brand this 1.0. We will see if we create a vUDS session to discuss any future plans for this tool (and the other ones in phablet-tools).

The provisioning types

The easiest thing to do here is to just list the help contents, but in summary it would be:

cdimage-touch
Provisions the device with a CDimage build of Ubuntu Touch.
cdimage-legacy
Provisions the device with legacy unflipped images. These images really shouldn't be used anymore, but it's a good time machine.
ubuntu-system
Provisions the device with an Ubuntu Image Based Upgrade image. If you still don't know what this is, refer to Stephane's blog post or the wiki describing it.
community
Provisions the device with a community supported build. Community based images as described by Daniel on his blog. In a nutshell, each porter provides a manifest of where their ports are located and the are provisioned to the target devices, this currently only works with recovery images that support extendedcommands. Support for openrecoverscript is one of the close targets.

It should be easy to add more, the upcomming ones I have in mind are adhoc and android-factory, or even just cm (for cyanogenmod)

The extra parameters the cdimage ones support are --device-path and --ubuntu-path where you can override the defaults with whatever you are experimenting with.

New habits

If in previous versions of phablet-flash you ran:

  • phablet-flash now run phablet-flash cdimage-touch
  • phablet-flash --pending now run phablet-flash cdimage-touch --pending
  • phablet-flash --legacy now run phablet-flash cdimage-legacy, and use the other legacy options appended here, i.e.; --list-revisions, --latest, --list-revisions and so on.
  • phablet-flash --ubuntu-bootstrap now run phablet-flash ubuntu-system with options of --revision being a relative revision or a specific version.

Final comments

So if you get a 1.0 version in an update soon, this means you have this.

Read more

Now that you use data with your cellphone provider over Ubuntu Touch people are getting hands on with it even though it requires manual enablement.

In effect, more usage implies more bugs; and they are more than welcome.

Since carriers are different all around the world, fixing those specific bugs may be rather complicated without a good bug report.

The setup

In order to do so, on your device you would need to install:

apt-get install ofono-scripts

Enable logging for the ofono upstart scripts:

  • cp /etc/init/ofono.conf /etc/init/ofono.override
  • Open /etc/init/ofono.override
  • Locate the exec ofonod line and add a -d

Enable logging for the Network Manager upstart scripts:

  • cp /etc/init/network-manager.conf /etc/init/network-manager.override
  • Open /etc/init/ofono.override
  • Locate the exec NetworkManager line and add a --log-level=DEBUG

The bug

Reboot to start from scratch, if you can reproduce, provide these in your report:

The output of:

/usr/share/ofono/scripts/list-modems
/usr/share/ofono/scripts/list-contexts

and then fetch /var/log/syslog

Once you are done get rid of the two upstart override files.

Read more

After a comment from Rick in his blog post I thought I'd take the quick challenge. So here's the quick and dirty way to get it...

adb root
adb shell
ubuntu_chroot shell
apt-get install syncevolution
su - phablet
syncevolution --configure --sync-property "username=email@gmail.com" --sync-property "password=secret" Google_Contacts
syncevolution --sync refresh-from-server Google_Contacts addressbook

If you have the phone app while doing this you can see the magic happen. Take into account that all contacts not on the server will be wiped (you can look at other options in syncevolution so that doesn't happen).

If you have too many contacts your people lens may explode! BEWARE None of these will be in your favorites, so the carousel will disappear.

Read more

UPDATE: -s $ANDROID_SERIAL is optional.

If you ran jenkins and had a device hooked up, this is sort of pseudo code you would run:

phablet-flash -s $ANDROID_SERIAL -u http://cdimages.ubuntu.com/ubuntu-touch-preview/daily-preinstalled/pending
sleep 5
adb -s $ANDROID_SERIAL wait-for-device
sudo phablet-network-setup -s $ANDROID_SERIAL -i -n WAP_conf_file
phablet-test-run s $ANDROID_SERIAL -i
phablet-test-run -s $ANDROID_SERIAL -n -p 'camera-app-autopilot' camera_app

What does each thing do? Well here goes

phablet-flash
We install whatever is on /pending in cdimage using the -u option to specify a url.
phablet-network-setup
After the device is flashed, we are going to need networking to set it up. The -n specifies the configuration file to use on that device that would successfully connect us to the WAP whilst the -i installs some packages such as openssh-server and sets up our public key on the device.
phablet-test-run
There are two calls here, one just sets up autopilot with the -i and it could very well be part of the next call. That next call, installs the test package and runs the autopilot tests for that device. If the shell interferes with the tests you can stop it with -n. Adding a -a and -o grabs the xml results from the test.

So that's it. Some gotchas are that autopilot is in transition right now. This is using the current fork of what we have that works on devices. The next autopilot release 1.3 was supposed to fix and integrate everything, but there is an API breakage that needs to be solved.

Since this phablet autopilot was a quick fork and when this was done there was no way to detect resolution so it's hard coded to maguro's resolution and may be a cause of issue when running on other devices (this as well is in the new autopilot, and if migration takes too long we might bring it in).

Read more

raring images have been made available on cdimage, while they are not as solid as the quantal ones, you can still use them and start figuring out what needs fixing or how.

To get the image you can manually install it by downloading the image and then pushing it to the device like:

wget http://cdimages.ubuntu.com/ubuntu-touch-preview/daily-preinstalled/current/raring-preinstalled-phablet-armhf.zip
adb push raring-preinstalled-phablet-armhf.zip /sdcard/autodeploy.zip
adb reboot recovery

Alternatively you can use an alternate settings file like this one:

raring_settings.py

# This program is free software: you can redistribute it and/or modify it
# under the terms of the the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranties of
# MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
# PURPOSE.  See the applicable version of the GNU Lesser General Public
# License for more details.
#.
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# Copyright (C) 2013 Canonical, Ltd.

download_uri = 'http://cdimage.ubuntu.com/ubuntu-touch-preview/daily-preinstalled/current'
download_dir = 'phablet-flash'
ubuntu_image = 'raring-preinstalled-phablet-armhf.zip'
device_file = 'quantal-preinstalled-armel+%s.zip'
device_file_img = 'quantal-preinstalled-system-armel+%s.img'
boot_file_img = 'quantal-preinstalled-boot-armel+%s.img'
recovery_file_img = 'quantal-preinstalled-recovery-armel+%s.img'
recovery_script_template = '''boot-recovery
--update_package={0}/{1}
--user_data_update_package={0}/{2}
reboot
'''
supported_devices = ('mako',
                     'maguro',
                     'manta',
                     'grouper',
                     )
validate_device = True
legal_notice = '''"Touch Developer Preview for Ubuntu" is released for free
non-commercial use. It is provided without warranty, even the implied
warranty of merchantability, satisfaction or fitness for a particular
use. See the licence included with each program for details.

Some licences may grant additional rights; this notice shall not limit
your rights under each program's licence. Licences for each program
are available in the usr/share/doc directory. Source code for Ubuntu
can be downloaded from archive.ubuntu.com. Ubuntu, the Ubuntu logo
and Canonical are registered trademarks of Canonical Ltd. All other
trademarks are the property of their respective owners.

"Touch Preview for Ubuntu" is released for limited use due to the
inclusion of binary hardware support files. The original components
and licenses can be found at:
https://developers.google.com/android/nexus/drivers.
'''
accept_path = '~/.phablet_accepted'

Save it and then run:

phablet-flash --alternate-settings raring_settings.py

And that would be it, happy bug hunting and squashing!

Read more

So I'm back on track after some holiday time, good news is that I just spun out a raring build and have an update zip which I deployed on my phone.

A quick one:

$ adb shell cat /data/ubuntu/etc/issue
Ubuntu Raring Ringtail (development branch) \n \l

Why now?

We were originally running Quantal, we still are for practical purposes, and have been doing so since we were in feature implementation and many packages had overridden functionality. Now that the crunch time is over and trying to be the least invasive as one can be the move to Raring started.

It follows this blueprint and with some road bumps and conflicting schedules it is finally taking form. The idea behind all this is to smooth the transition to S.

What happened?

You may have noticed that the ppa:phablet-team is now full of packages built for Raring. Jenkins has been updated to do parallel builds for Quantal and Raring for those non conflicting packages and is pushing them into the PPA.

In the future we plan to move on to cdimage for building what we today do on offspring. That will happen as soon as we are on S for that will be the time when all these packages start to land into the archive and we start working on integrating our overridden packages.

I have a pending post on documenting the builds that's coming soon.

What's working and what's missing?

So there's a long list of things that are still pending and we probably won't switch to this until we get the parity as it is on Quantal, some things are plain broken and others are just missing.

It's in pretty good shape to be build #1!

My test subject today was maguro.

So from a quick glance, this works:

  • The shell in general (I was expecting a blank screen to be honest, this is build #1 after all).
  • Camera.
  • Gallery.
  • Browser.
  • Phone (not entirely, keep on reading).
  • Apps Lens.
  • Videos Lens.
  • Music Lens.
  • hud (did not try voice)
  • osk.
  • Messaging Indicator.
  • Sound Indicator.
  • Battery Indicator.

This doesn't work:

  • Home Lens.
  • Contacts Lens.
  • Media Player
  • Notes (probably because I'm missing a fix on a sidestage apps from the shell).
  • ofono (it's not packaged yet)
  • networking
  • Network Indicator.

Can I play too?

Yes you can, this build should probably work on all devices, the update zip can be grabbed from my UbuntuOne link, to install you can quickly run:

wget http://ubuntuone.com/6l0cbmXPs1jhvzLoa32QgU -O phablet-raring.zip
adb push phablet-raring.zip /sdcard/autodeploy.zip
adb reboot recovery

Provided that you have the recovery image with the ubuntu logo on it, it should just start, if not go through the menus and deploy it.

What comes next?

Here's a small TODO list:

  • Parity with Quantal builds is a first.
  • Provide update zip continuously on jenkins (which cdimage will pull from).
  • Work on the broken.
  • Work on the missing.

Once those are done:

  • Switch default to raring in phablet-flash.
  • Kill the Quantal builds.
  • Work on S.

Read more