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

Install

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 !

Issues

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

Connection Android 4.x MTP mass storage to Ubuntu 12.x

The ability to connect Android 4.+ devices to Ubuntu using the USB Mass Storage interface has always been a pain. With Ubuntu 13.04 a new MTP back-end (gvfs-mtp) is going to be introduced, but I have had some issues with the 13.04 Beta so I found this backport PPA to Ubuntu 12.04 and 12.10

sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
sudo apt-get install gvfs
sudo apt-get upgrade

Kudos to Phillip Langdale for the work and maintaining the PPA !

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)

*#*#4636#*#*

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

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.

Nokia Bluetooth Keyboard on Android

One of my oldest pieces of hardware is a trusty Nokia SU-8W Bluetooth Keyboard. I have tried to revive it on an Android 1.6 & 2.0 device with not much luck. However I got it working successfully on a Gingerbread (2.3.4) Google Nexus S.

Pre-requisites

Steps

  1. Install the BlueKeyboard JP from the Android Market
  2. Go to Settings > Wireless & Networks > Bluetooth Settings
  3. Scan for devices and click to pair the Nokia SU-8W
  4. Enter a passcode (I used the highly inventive 0000 combinaton) on the phone and click ‘OK’
  5. Enter the same on the SU-8W (need to use green ‘fn’ keys for numbers) and hit enter
  6. The phone should show the Nokia SU-8W as paired but not connected
  7. Go to Settings > Language & keyboard > BlueKeyboard JP Settings
  8. Select the Nokia SU-8W as the keyboard and make any other changes you might need
  9. Click the ‘Back’ symbol and tick the option box to enable the ‘BlueKeyboard JP’ keyboard
  10. In any data entry field (i.e. GMail) hold the finger on the input box and click ‘Input method’ and select BlueKeyboard JP
  11. Wait for the keyboard to connect.

 

Enjoy !