Ubuntu Touch install on Nexus 4

This is the last of a series of alternative mobile OS installs and the easiest install by a country mile !

Ubuntu Touch Logo


Everything is quite well documented here: https://wiki.ubuntu.com/Touch/Install.

sudo add-apt-repository ppa:phablet-team/tools
sudo apt-get update
sudo apt-get install phablet-tools android-tools-adb android-tools-fastboot
phablet-flash ubuntu-system --channel devel --bootstrap

That is it really ! This is how a OS change on a mobile should work !


Ubuntu touch can not yet handle the radio firmware past Android 4.3 devices. So if your N4 was upgraded to Android 4.4 (KitKat) you need to flash the radio to the Android 4.3 (up to Version 2.0.1700.84) else WIFI will not work.

Download 4.3 Stock Image from: https://developers.google.com/android/nexus/images#occamjwr66y

fastboot flash radio fastboot flash radio radio-mako-m9615a-cefwmazm-2.0.1700.84.img
fastboot reboot

Wifi setup

(Optional – this can be done via phone UI as well). Connect the phone via USB

adb shell
nmcli -pretty dev wifi connect NETWORK-NAME password PASSWORD

Installing Custom ROM on Galaxy S4 International from Ubuntu

Or as an alternative title “Liberating your Galaxy S4 Hardware from Samsung Bloatware”.

Unfortunately there is lots of (ad-infested) blogs and forums with dodgy pieces of information on this topic and I found it pretty hard to get descent concise information. So hopefully this might help some poor Linux User liberate their phone. Whilst this has been tested on a Samsung GT-I9505 S4 International LTE device (JFLTEXX series) it should be applicable to other similar Samsung phones that are not fastboot capable (ie. all but the Galaxy Nexus range).

Samsung Galaxy S4 - gap with dust by Janitors, on Flickr
Creative Commons Attribution 2.0 Generic License  by  Janitors 

NOTE: If you have encrypted your device do yourself a favor and do a factory reset BEFORE you start the process (otherwise you will be stuck in a boot-loop as the encryption key will be gone and the device will not start without it). See note below to recover to stock Samsung image if you need to.


This area is the hardest to get decent (Ubuntu relevant) information. However (contrary to some forum entries out there) Heimdall is the most workable solution to use from Ubuntu – binary .deb packages are available from https://bitbucket.org/benjamin_dobell/heimdall/downloads. There is both a commandline package as well as a GUI available for Ubuntu 12.10 and 13.04 as well as other Linux distros.

Note [2014-11-24]: Had to upgrade my daughters S4 Mini and I noticed that Heimdall is now in the default UBUNTU Repositories. You can install simply by ‘sudo apt-get install heimdall-flash‘ now.

Make sure the device has Developer mode enabled

  • Go to Application > Settings.
  • In the upper-right corner of your screen, tap on “More” button.
  • Navigate to the bottom and select About.
  • Tap “Build number” several times until you see a message that says “Developer mode has been enabled“.
  • Tap the Back button and you will see the Developer options menu under the “System” heading, you can now set Developer options.
  • Check the USB debugging box under Developer options and you are ready to use your Samsung Galaxy S4 in debugging mode.

A very big THANK YOU to Benjamin Dobell from Glass Echidna. Can’t comment on the blog – your work is much appreciated.

Flash cf-auto-root images

Download the I9505 images from http://autoroot.chainfire.eu/ and extract.

Boot the device into download mode (Press POWER ON + VOLUME DOWN + HOME simultaneously and then when the green Android appears VOLUME UP)

This part took me a while to get right as there was not a lot of decent information around (NOTE: CASE-sensitive PIT partition name). You also need to have the “–no-reboot” flag as you need to boot straight into recovery as a reboot will revert back to the Samsung recovery image.
heimdall flash --no-reboot --RECOVERY recovery.img --CACHE cache.img.ext4

Reboot manually into Recovery Mode (Press POWER ON + VOLUME UP + HOME simultaneously) and the rooting process should complete.

Install Recovery Image

As per recommendation from the XDA Forums I used PhilZ recovery. The GT-I9505 files are at http://d-h.st/users/philz_touch/?fld_id=16685#files

Extract the recovery.img file from the ZIP and flash the recovery partition

heimdall flash --no-reboot --RECOVERY recovery.img

Install AOSP Google Play Edition

Boot into the Touch Recovery Boot (Press POWER ON + VOLUME UP + HOME simultaneously) and load the following file with

adb sideload 20130629-GoogleEdition.zip

If you are stuck with an error message that reads: error: closed

adb usb


EDIT (2013-07-23): Google Play Edtion ROM’s did not work for me (no data connection other than WIFI) – would be great to hear if this works for other people with Australian radios. Ended up using PAC Man ROM – https://plus.google.com/communities/103029729817409918322 which appears the most stable AOKP style firmware. So far looks good – no bloat & squishy noises !

EDIT (2013-08-13): Since the PAC Man ROM had problems with audio on some calls I have switched back to an AOSP Google Play Edition ROM. I have in the meantime worked out that the reason the original Google Play Edition install did not work was simply the missing APN settings for Telstra. D’oh!! I am now running the 4.3 S4 Google Edition ROM from: http://forum.xda-developers.com/showthread.php?t=2348272

Here is the TELSTRA (Australia) APN Settings:
Name: Telstra Internet
APN: telstra.internet
Server: wap.telstra.com/wap
MMSC: http://mmsc.telstra.com:8002
MMS Proxy:
MMS Port: 80
MCC: 505
MNC: 01
Authentication Type: CHAP
APN Type: default,mms

Reverting back to Samsung Stock ROM

If there are no backups you need to download the Stock ROM’s from http://www.samfirmware.com/ or similar site

heimdall flash --no-reboot --RECOVERY recovery.img --BOOT boot.img --SYSTEM system.img.ext4 --CACHE cache.img.ext4 --HIDDEN hidden.img.ext4

Note: you need to boot into recovery mode and do a facory reset to remove device encryption completely.


Chromebook tips to get started

Just got myself (actually it’s for our Office Manager back in OZ) one of these Chromebooks while in Europe (since Google Australia with their absolutely hopeless hardware strategy do not seem to be able to ship any devices – Nexus 4 anyone ?) .

Since the first days turned out to be a bit of a frustrating experience, I thought I share some of the findings as I had a hard time finding much useful info on troubleshooting ChromeOS.

Wireless Connection (WIFI)

Do not use WPA (or for that matter WEP) connections with ChromeOS. I had extreme difficulties browsing webpages on the Chrombook. Some pages would load, some pages would not load at all. There seemed to be no consitency to it as some would load one day, but not another. Somewhere in the Google Groups there seemed to be people reporting issues with wireless connections using WEP. It turned out that the Wireless Modem Router (Telekom Austria supplied Pirelli PBS modem) where I was staying was set to WPA encryption only by default. Once I figured out how to set the unit to WPA2 (which these days should really be the default anyway) things started to actually work consistently. Check the sections below (specially chrome://diagnostics) to see how you can find out what’s going wrong.

However to save some trouble & frustrations, before you do anything make sure your Chrombook connects using WPA2 !


CTRL+ALT+T will launch the Chrome Shell which is a slightly odd and very cut-down command line shell. Other than a ‘ping’ utility and some debug tools there really seems to be only the ‘ssh’ command that would be very useful to connect to remote systems. Unfortunately the SSH implementation is quite unusual compared to my normal OpenSSH client.

Poking under the hood

  • Get diagnostic info: chrome://diagnostics/
  • Settings: chrome://chrome/settings/
  • Get hard-disk space: chrome://quota-internals/
  • Bandwidth used: chrome://net-internals/#bandwidth
  • Factory reset the unit: chrome://chrome/settings/factoryResetData
  • Complete listing of ‘chrome’ URL’s: chrome://chrome-urls/

Developer mode

To make some serious mods to the Chromebooks you need to boot into Developer mode. On the Samsung 303C ARM Chromebook this is achieved by holding ESC + Refresh buttons when pushing the power button to turn the unit on. Probably best left alone unless you know what you are doing.

Galaxy Nexus Firmware Upgrade on Ubuntu (manual)

As a Galaxy Nexus Owner I have been waiting for months for an OTA (over the air) upgrade to the factory installed Firmware (4.0.2). I am finally sick of waiting and complaining to Google (an absolute lost cause).

After some research it turns out that (contrary to popular opinion) not every unlocked Google Nexus actually has the ‘official’ Google Firmware. Some of them have a Samsung variant (WTF !?) of the firmware. Now I really don’t want to get off the technical topic, but I personally think that this means Google is misleading their most loyal customer base. The reason I chose a Nexus device over the (from a hardware perspective) superior HTC One X was the fact that they were supposed to have the official Google Firmware and I did not have to wait forever for bugfixes from the manufacturers.

There are a reportedly several different versions out there. Google’s ‘official’ build for the GSM version of the Galaxy Nexus is named ‘yakju’. Samsung builds ‘yakjusc’, ‘yakjuxw’ and ‘yakjuux’. While they appear mostly the same, only Google’s yakju build is likely to get updates as they happen. Go figure why there was a need for others … :(

To find out which version your Nexus uses you can use this key combination (in the phone app)


or for a more permanent option grab “Android System Info” from the Google Market.

Disclaimer: this procedure obiously has the potential to ‘brick’ your mobile. Only attempt this if you are absolutely comfortable with flashing device firmware. Proceed at your own risk !!! If you decide to proceed – BACKUP YOUR DEVICE FIRST ! Check the documentation for ‘adb backup‘.

All the notes below are for GSM (HSPDA+) NEXUS (GT I9250 – maguro) devices !

Android SDK Install

The Android SDK can be downloaded from the Androide Site: http://developer.android.com/sdk/index.html)

Android Fastboot Mode

For all the following procedures to work the device needs to be in ‘Fastboot Mode’
How put your phone in fastboot mode:

  1. Power off the phone
  2. Hold the Volume Up Key + Volume Down Key pressed and at the same time press the Power button.

You should now see an Android robot with it’s body opened (see photo).

wget http://dl.google.com/android/android-sdk_r18-linux.tgz
tar -xzf android-sdk_r18-linux.tgz
android-sdk-linux/tools/android update sdk --no-ui
#test fastboot mode
#this should show the serial number of the connected device
cd android-sdk-linux/platform-tools/
fastboot devices

Adding the USB Driver definitions for the Galaxy Nexus

vim /etc/udev/rules.d/70-android.rules
#add this line:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

Unlocking the Bootloader

NOTE: This command will erase the whole device. Make sure backups have been taken before (check the ‘adb backup’ tool http://developer.android.com/guide/developing/tools/adb.html).

fastboot oem unlock

Flashing the new Firmware

The ‘factory images’ for Nexus devices can be found here: https://developers.google.com/android/nexus/images – make sure to choose the correct model. The commands below are for the European GSM/HSPDA+ version of 4.0.4 (yakju)

wget https://dl.google.com/dl/android/aosp/yakju-imm76i-factory-8001e72f.tgz
tar -xzf yakju-imm76i-factory-8001e72f.tgz
fastboot flash bootloader yakju-imm76i/bootloader-maguro-primela03.img
fastboot reboot-bootloader
fastboot flash radio yakju-imm76i/radio-maguro-i9250xxla02.img
fastboot reboot-bootloader
fastboot -w update yakju-imm76i/image-yakju-imm76i.zip

After the last step the handset will reboot and you should be presented with a Google “Stock” device and go through the normal Android setup wizard. As it should have been when I purchased this “Google” branded device in the first place – thank you Google (and of course SAMSUNG) for wasting my time !

If you want to lock your bootloader after the upgrade (not necessary) you can go into Fastboot Mode again and issue the following command:

fastboot oem lock

Running Android 4.0 (ICS) on Virtualbox

Debugging things on the Android Emulator (incluced in the SDK) can be a very slow and cumbersome process. Thanks to the Android-x86 Project it’s quite easy to run Android in VirtualBox. This is highly useful when you need to test mobile apps and websites from the Android Browser (as well as Chrome Mobile).

  1. Download an Ethernet enabled ISO from Tablets x86

    wget http://dl.dropbox.com/u/75945873/android-x86-4.0-eth0-generic_x86-20120426.iso.torrent
    transmission android-x86-4.0-eth0-generic_x86-20120426.iso.torrent

  2. Create new ViratualBox VM
    VM Settings 1
    VM Settings 2
    VM Settings 3
    Important Settings (see screenshots)

    • OS: Linux, Version: Linux 2.6
    • Enable VTx/AMD-V
    • Use Bridged Network Adapter (if you want to allow direct Internet Access)
  3. Mount the ISO file downloaded previosly and start the VM
    Install dialog
  4. Create the Root Filesystem (ext3) on the VBox .vdi created with the new VM, mark as bootable
  5. Write the Filesystem changes to disk (VDI) and format the disk
  6. Install GRUB Boatloader
  7. Copy files from ISO to VDI
  8. Unmount the ISO image and reboot
  9. Note: You need to disable the mouse pointer integration (if you have installed VirtualBox Client Add-ons) in the menu of Virtualbox (‘Machine’ –> ‘Disable Mouse Integration’) when you start the VM (see screenshot). I have not found a way to disable this by default on Virtualbox on Ubuntu (If anybody has managed this I would love to know how !)

    Disable Mouse Integration

  10. Start the Android Setup Wizard to set locale and you should be up and running (network should already function to test external sites from Android browser) !

Intel Ultrabook tweaks on Ubuntu 12.04

After upgrading my Toshiba Z830 Ultrabook to 12.04 (Precise Pangolin) I noticed that the ability to control the screen back-light was not working using the Toshiba Fn F6/F7 keys.

Thanks to http://www.linlap.com/wiki/acer+aspire+s3 the solution was found quite quickly.

sudo vim /etc/default/grub

This will open the grub configuration file. (Grub is the initial boot selection software)
To be able to dim the screen brightness, You’ve got to modify the line:


to these two lines:

GRUB_CMDLINE_LINUX="quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.lvds_downclock=1 acpi_osi=Linux acpi_backlight=vendor elevator=noop"

Another neat tip: intel-gpu-tools can be used to control brightness from the commandline.

# will set brightness at 50%
intel_backlight 50

EDIT [2012-08-24]: to avoid issues on resume you need to add a script to the

sudo vim /etc/pm/sleep.d/20_wakeup

Add the following:

case "$1" in
#do nothing
echo 7 > /sys/class/backlight/toshiba/brightness
exit 1
exit 0

Mark the file as executable
sudo chmod +x /etc/pm/sleep.d/20_wakeup

Accessing Samsung Galaxy Nexus as USB Media Device Ubuntu 12.04

To use a Samsung Galaxy Nexus as a media device (MTP) there is a utility called gMTP.

sudo apt-get install gmtp mtpfs mtp-tools

NOTE: Unfortunately there is a bug in the 64-bit version at the moment (https://bugs.launchpad.net/ubuntu/+source/mtpfs/+bug/936165) – which means it’s not all that useful to me at the moment.

Disable the Guest account from Ubuntu Login Screen

Having a guest account might be useful on a home computer, but it’s generally not what I want enabled on a notebook.

To disable the default Guest account you need to edit lightdm.conf and add a line (allow-guest=false).

sudo vim /etc/lightdm/lightdm.conf


Tested in Ubuntu 12.04 LTS Precise Pangolin & Ubuntu 11.10 Oneiric Ocelot


As a follow-up on a very old post I thought it’s worth providing an update. Despite it’s age (& only costing $350 at the time) my little Asus EEE PC 900 it is still a useful device. It has turned out as one of the better IT investments in my lifetime. However it’s not (and was never) the fastest kid on the block and recent OS upgrades have become increasingly resource hungry.

With the recent Ubuntu 12.04 LTS upgrade I was in the process of upgrading a few other notebooks and noticed that the release schedule for some of the Ubuntu variants (Kubuntu, Xubuntu & Lubuntu) has been brought in line with the main OS branch. So while waiting for the installs on the other machines to finish I thought about updating the EEEPC as well. I tried Xubuntu at first, but did not like the interface (and the default apps pre-installed) and there were hardly any performance gains.

But installing Lubuntu was a different story. I am very impressed by the LXDE desktop environment and the UI performance. The responsiveness of the UI is remarkably better than other desktop managers on a small netbook. And you still get the underlying strengths of the Ubuntu (Debian) based package management in it’s latest revision. That means most applications come packaged and there’s PPA’s for the rest.

Looks Lubuntu’s the new favourite. Hat tip to the Lubuntu maintainers and LXDE developers – excellent work in producing a no-frills but very functional, decent looking & usable desktop environment for devices that are getting a bit older … !


Jitsi Ubuntu VoIP SIP Client

The latest instalment in my never-ending quest to find a decent SIP client (see Ubuntu SIP I & Ubuntu SIP II) I came across JITSI (http://jitsi.org/). Since the website looked very interesting and the project seems very well maintained (http://jitsi.org/index.php/Main/Screenshots) I decided to give it a go.

The installation is a breeze with a Ubuntu/Debian package available and the installation also adds the repository to keep the package up to date.


After a few test calls it seems to work very well. The UI is much more intuitive than comparable Ubuntu clients. Looks I found my new default client – nice job Jitsi Team.