Good bye Android ? Hello Ubuntu ! Not yet unfortunately …

As a long-term Ubuntu user I am extremely interested in what Canonical and the Ubuntu community are doing on the mobile front. Their convergence strategy (I am testing Snappy Core on IoT devices as well) seems very well thought through and once the the Meizu MX4 phone was released I got myself an invite and ordered a unit. It took a while to ship and then also had to make it’s way down under as Meizu only ship to Europe (and Asia I believe).

Meizu MX4 Ubuntu

Having played with Ubuntu on the phone a while ago on an old Nexus 4 as well as a Nexus 7 unit it was a much more pleasant initial experience and I was really hoping to make this my day-to-day phone. After the initial excitement and a few days of use (including with my main SIM card) however it is clear that we’re not at this stage yet. I am quite prepared to forego some conveniences I got used to on CyanogenMod (Android) over the years, but at this stage there are just too many things not working consistently. On the surface most of the critical components are there, but there is just too many bugs and inconsistencies in heavy usage left to make this a solid experience unfortunately. The single button hardware also doesn’t seem to work with the UI as in a lot of places you are searching for a back button and there ain’t one. And to my surprise the browser feels pretty horrible and lacks a lot of functionality. If the browser would work solidly a lot of the missing apps would be bearable. But this coupled with lack of stability prevent me from taking the plunge I was hoping to make and ‘de-google’ a little more….

It might work if you use your phone for voice calls and occasionally browsing. But as a very heavy user relying on the phone for work the overall stability is some way off.

The Great

  • A phone where you don’t have to jump through unreasonable hoops to get under the hood
  • Refreshingly different & pleasant UI
  • Very developer friendly
  • Terminal – it just works …
  • All Linux CLI programs (armhf) at your fingertips

The Good

  • All pre-installed crap-ware such as Ebay & Amazon apps easy to remove (would be nice not to have them – but they need to make some money)
  • Phone functions are solid and good voice quality
  • Camera on the MX4 is pretty decent
  • Familiar to Ubuntu users
  • Great selection of Reddit clients & German IPTV apps ;-)

The Bad

  • The inbuilt browser is very under-cooked – missing basic functionality plus not very intuitive rendering
  • Sharing between apps not working well – plus lack of apps that support intents – something extremely useful that Android really shines at
  • Calendaring
  • UI still seems sluggish for the computing power available on MX4

The Ugly

  • Stability – lots of apps (web-apps) refuse to display randomly
  • Home screen lock-ups with no other options than reboot
  • Many of the apps that are available are of very questionable quality – mostly websites with wrapper

I will keep a very close eye on what’s happening with the next releases (OTA6 release is due in 5 weeks) and in the meantime will help out with testing & debugging. I have been really pleasantly surprised by the responsiveness of the developers (for example the missing WIFI Hotspot functionality – it will be available next release and the devs sent me an invite to the pre-release after asking a question on Reddit). I don’t want this to be seen as dismissal of Ubuntu on phones. Just some realism as I feel selling this phone as a ‘finished’ product by Meizu is a mistake that could damage the overall aim. I still hope to settle there eventually. The community is working very hard and it’s just a question of time…

Views ‘under the hood’ of Ubuntu Phone

Here are some initial notes on how to get “under the hood” access to the Ubuntu phone.

Enable Developer mode

System Settings –> About this phone –> Developer Mode

Ubuntu Phone - Developer Mode

Install tools on the desktop / notbook device

sudo apt-get install phablet-tools

Connect via SSH

vim .android/adb_usb.ini
#add the following line to allow adb access to device
0x2a45

sudo vim /etc/udev/rules.d/51-android.rules
#Meizu MX4
SUBSYSTEM=="usb", ATTR{idVendor}=="2a45", ATTR{idProduct}=="0c02", MODE="0664" OWNER=""

phablet-shell

Important note: the phone needs to be unlocked for this (and other phablet-tools commands) to work. If the phone is locked you will get a series of adb error messages.

Change Ubuntu Touch Channel

adb shell
sudo system-image-cli --switch ubuntu-touch/rc-proposed/meizu.en

More info on channels here: https://developer.ubuntu.com/en/start/ubuntu-for-devices/image-channels/

Make filesystem writable

DISCLAIMER: Proceed with caution ! You can do some serious damage if you don’t know what you are doing. But on the other hand you have the whole power of apt-get install available to install armhf packages that might be useful.

phablet-config writable-image

Disable writable mode

sudo rm /userdata/.writable_image

Screenshots

Taking screenshots is something I commonly like to do for documentation purposes.

Via commandline

phablet-screenshot

Via phone

Hold volume up and volume down until you hear the picture sound and see the screenshot flash.

In both cases your screenshot will be saved in /home/phablet/Pictures/Screenshots and you can view them using the gallery app or download via USB.

Ringtones

Currently there is no way to change you ringtones in the UI and I fully agree that the focus should be on much more important functions. But I got used to my ringtone and don’t respond to others anymore.

sudo cp /home/phablet/Downloads/ringtones/GoodBadUgly.ogg /usr/share/sounds/ubuntu/ringtones/

Note: the sudo password for the “phablet” user is the same as you set for your screen-lock.

Finding Notebook Hardware for Ubuntu – 2015 Edition

Unfortunately it is still much harder than necessary to find notebook hardware to use with Ubuntu (or other Linux variants). This blog is full of past experiences (some of them quite time-consuming) on finding notebook hardware that will work without too much fiddling. This short note is to document my recent research on that front to help others who want to do the same (as there doesn’t seem to be a lot of good current info around).

There are some vendors that do ship with Ubuntu, however they are generally all based in the US and their pre-sales communications are pretty horrible (I am talking to you ZaReason – still waiting for reply email as well as tweet). Then there is Purism Librem, but unfortunately they have still not shipped their 15″ version and I need a tool now. The jury on this is still out and I don’t really have the time to be a guinea-pig. Maybe next time (as I like what they are doing) …

There was one option from one of the top-tier manufacturers (Dell XPS 13 – Developer Edition) which ships with Ubuntu. But as – per usual – NOT in Australia. However there was a lot of conflicting evidence I found that the Windows Version had some issues with current Ubuntu versions (Dell ship 14.04 LTS – which makes sense from their point).

I ended up buying the Lenovo X1 (3rd Generation) and after the install of Ubuntu I have to say this is the first notebook I just had to plug in the Ubuntu USB (Version 15.04 Vivid Vervet 64bit) and install and everything just worked. No fighting with UEFI firmware, no function keys not working and no issues with sound or other drivers. To be fair – there is one thing I noted (which is irrelevant to me) – the fingerprint reader does need some additional driver installed & configured.

It was also the first notebook I didn’t even bother booting up and create a repair disk first. There is no way I would ever restore something to Windows 8 – however if you are not sure that you will stick with Ubuntu – that’s probably not advisable.

Thank you Lenovo for developing a very decent piece of hardware that just works with Ubuntu ! However I would like to note that the recent Superfish debacle http://support.lenovo.com/us/en/product_security/superfish really left a sour taste and nearly made me take Lenovo off the evaluation list.

Some conversations that might be useful:

https://www.reddit.com/r/Ubuntu/comments/37ukqe/dell_xps_13_vs_lenovo_thinkpad_x1_carbon_3rd_gen/
https://www.reddit.com/r/Ubuntu/comments/37t4re/ubuntu_notebook_hardware_available_in_from/

SShuttle – quick and temporary VPN over SSH

Every once in a while you find a gem. One of these for me is SShuttle – until now I have not known about this one.

Sometimes you need to quickly forward all your traffic via a remote server quickly. And while you can do all of this manually using OpenSSH it’s not a quick one-step process (https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding). Dynamic SOCKS5 proxies are great if all you need is browser traffic, but there is always software that won’t play ball with SOCKS.

Use-case: I just been trying to get Ubuntu Make to install Eclipse IDE and the local AARNET download mirror is just refusing to cooperate (https://github.com/ubuntu/ubuntu-make/issues/90). A quick forward to a remote VPS fixed the issue without headaches

Install

sudo apt-get install sshuttle

Run

sshuttle -r username@servername.tld 0.0.0.0/0 -vv

That’s all – it sets up routing & iptable rules transparently and removes them after use. Kudos goes to https://github.com/apenwarr – thank you. A VERY useful utility !!!

Source link: https://github.com/apenwarr/sshuttle

Installing Ubuntu Phone (Touch) on Nexus 7 LTE

ubuntu phone

Add SDK repository

sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt-get update
sudo apt-get install ubuntu-device-flash

Enable USB Debugging on the device

  1. Make sure you have developer mode enabled (see http://developer.android.com/tools/device.html if you are unsure).
  2. Navigate to Settings > Developer options
  3. Enable USB Debugging. When a device is connected, you will be prompted in Android to authorize it.

Unlock Bootloader

adb reboot bootloader
fastboot oem unlock
fastboot reboot

Check that you have the right device

adb shell grep ro.product.name /system/build.prop > mydevicedata \
&& adb shell grep ro.product.device /system/build.prop >> mydevicedata \
&& adb shell grep build.id /system/build.prop >> mydevicedata

ro.product.name=razorg
ro.product.device=deb
ro.build.id=KTU84P

Check which channels are available

ubuntu-device-flash --server="http://system-image.tasemnice.eu" query --list-channels --device=deb

ubuntu-device-flash –server=”http://system-image.tasemnice.eu” query –list-channels –device=deb
ubuntu-touch/ubuntu-rtm/14.09
ubuntu-touch/ubuntu-rtm/14.09-proposed
ubuntu-touch/utopic
ubuntu-touch/utopic-proposed
ubuntu-touch/vivid
ubuntu-touch/vivid-proposed
ubuntu-touch/devel (alias to ubuntu-touch/vivid)
ubuntu-touch/devel-proposed (alias to ubuntu-touch/vivid-proposed)
ubuntu-touch/ubuntu-rtm/devel (alias to ubuntu-touch/ubuntu-rtm/14.09)
ubuntu-touch/ubuntu-rtm/devel-proposed (alias to ubuntu-touch/ubuntu-rtm/14.09-proposed)

In my case I am going for the currently stable ‘ubuntu-touch/vivid’ channel.

Install Ubuntu Touch

ubuntu-device-flash --server="http://system-image.tasemnice.eu" touch --channel="ubuntu-touch/vivid" --bootstrap

References
Ubuntu Devices: https://wiki.ubuntu.com/Touch/Devices

CyanogenMod 12 on Sony Xperia Z2

Just a quick update of the previous article on “Sony Xperia Z2 upgrading to CyanogenMod 11“.

One thing is that CM now included the custom recovery and you do not need to download any other custom recoveries !

Download the CM 12 ZIP file for Sony Xperia Z2 (sirius) and extract the ‘boot.img’ file

Download link: https://download.cyanogenmod.org/?device=sirius

Get the device into fastboot (bootloader mode)

fastboot -i 0xfce flash boot boot.img
fastboot reboot

Install CyanogenMod

Choose the “Install zip from sdcard –> Install from sideload” option

adb sideload cm-12-20150219-NIGHTLY-sirius.zip

After the install has finished choose the “Reboot system now” option.

Vodafone LTE mobile data on Cyanogen Mod

I have had some issues recently with getting LTE (4G) connectivity on the Vodafone Australia Network using CyanogenMod 11 on multiple devices (http://forum.cyanogenmod.org/topic/92919-no-4g-signal-on-vodafone-au/). Turns out that it was an APN issue after all.

The APN provisioned by default when the Voda SIM card is inserted (vfinternet.au) does not work for the LTE Data Network. It works with GPRS & WCDMA, but fails to connect when the phone is set to prefer LTE (4G) Networks and they are actually available. It means that the handset will loose mobile data connectivity altogether. There are various APN Settings floating around on the interwebs, but any I tried previously did not fix the issue.

Ater needing to call Vodafone support for another device (on GPE Stock Android) that was experiencing the same issue I got given these APN Settings:

Settings –> Mobile Networks –> Access Point Names

APN Name: Vodafone AU
APN URI: live.vodafone.com

Leave all other settings at default (for MMS settings see the link to VF Support below).

image

I have tested this for 2 days and works beautifully. The correct APN settings can be found here: http://support.vodafone.com.au/articles/FAQ/APN-Settings

Sony Xperia Z2 upgrading to CyanogenMod 11

Contrary to my normal inclinations not to buy anything but Stock Android phones I ended up with a Sony Xperia Z2 in a hurry over the weekend (it’s a long story…). It appears to be quite a decent handset (with a pretty good camera actually) and one of the main reason to choose this over the other options was that is was one of the few high-end devices which already had a CM snapshot rather than just nightly releases. However similar to their colleagues at Samsung the Sony people also opted to stuff all sorts of crap-ware bloat onto the Android base OS. It appears not to be as bad as the Samsung (who are the kings of crap) mods, but for somebody used to the clean Android experience it’s just very annoying. So I opted to flash it straight to CyanogenMod.

Sony Xperia Z2 2 by epct414, on Flickr
Creative Commons Creative Commons Attribution-No Derivative Works 2.0 Generic License   by  epct414 

Prerequisites

You need the Android SDK installed and on your Path – see one of my other posts on how to do this.

Get Bootloader Unlock Code

Another annoying step which is not required with Google Nexus series.

http://unlockbootloader.sonyericsson.com/instructions

You will need to enter and confirm your email (WTF?) and need your IMEI number and at the end of the process you will get an update key that is required below.

Put phone into bootloader (fastboot) mode

Insert one end of the USB cable into your PC. Turn off the device and wait at least 5 seconds. Press and hold the Volume Down button and plug the other end of the Micro-USB cable in to your device.

fastboot devices
#should display the ID of the connected phone
fastboot -i 0x0fce oem unlock 0xKEY

Download CyanogenMod Release

Extract the boot.img file from the downloaded ZIP file via https://download.cyanogenmod.org/?device=sirius

fastboot -i 0xfce flash boot boot.img
fastboot -i 0xfce reboot

This should boot into Clockwork Mod Recovery and you can use the Volume +/- to navigate and On/Off button to choose.

Select the “Wipe data/factory reset” option

Note: this part was not in the CM Wiki or anywhere else and took me a while to get past. If you see an error “Error Mounting /sdcard/.android_Secure!” during the factory reset procedure you need to format the data partition manually. If you do not do this step the CM install will still work but you will not be able to boot the phone (it gets stuck at the Boot Animation).

Mount /data
Format /data

After the manual format procedure do the “Factory reset” again.

Install CyanogenMod

Choose the “Install zip from sdcard –> Install from sideload” option

adb sideload cm-11-20140804-SNAPSHOT-M9-sirius.zip

After the install has finished choose the “Reboot system now” option.

CM Wiki Entry: http://wiki.cyanogenmod.org/w/Install_CM_for_sirius

Finding a private location check-in service

Foursquare decided that it was too hard for them to compete with location services like Yelp and split their app into two separate apps. Whilst that might make sense to the 4Square CEO and his VC masters, it makes no sense from a users perspective. Foursquare can be a bit of a battery hog already, and having 2 apps to open and “annoy” you with notifications is not an improvement by any means. And if I wanted Foursquare to be Yelp – I would have used Yelp in the first place. So no – I do not want to install another separate check-in App (called Swarm). One battery hogging location app was enough.

no checkins here by leogaggl, on Flickr
Creative Commons Creative Commons Attribution-Noncommercial-Share Alike 2.0 Generic License   by  leogaggl 

The other argument used by 4Square’s CEO is that he didn’t want users confused about the “gamification” aspects of 4Square. I personally think that this is highly patronising to the Foursquare user base. I am sure most users would be able to work out what it is useful for.

Since I have always used 4Square mainly as a means to get some analytics of my movements and historic record of where I was at what time (I always downloaded my checkins to Thinkup on my own server) I was trying to find something that would fit the same use case. Meet Ushahidi (http://www.ushahidi.com/) – an excellent geo-coded “reporting” service developed in Kenya. I have been following this project for years already.

Dynamic Timeline

Track your reports on the map and over time, filter your data by time, and see when things happened and where.

Interactive Mapping

One of the most powerful ways to visualize information is to display it on a map. The Ushahidi platform give you rich information mapping tools.

Multiple Data Streams

The Ushahidi Platform allows you to easily collect information via text messages, email, twitter and web-forms.

Free & Open Source

The Ushahidi Platform is free for you to download and use. It is released under the GNU Lesser General Public License (LGPL).

Installation information for your own Ushahidi Server can be found on GitHub – or you can use their hosted service called Crowdmap.

Whilst this is obviously not an option for everybody it works for me. I will miss some the social aspect of 4Square as I had a small number of people I was sharing my check-ins with and it did bring about some by-chance meetups & conversation about other people’s check-ins. But the Ushahidi instance can be shared between multiple people. Maybe some will come along for the ride.

So long Foursquare – it was nice while it lasted ! If you treat your users like sheep – all you will be left with is sheep…

And for those who want to delete their Foursquare account: https://support.foursquare.com/hc/en-us/articles/201065530-How-do-I-delete-my-account-.

ARD Mediathek offline viewing on Ubuntu

Since I am a bit of a sucker for German “Krimis” as well as some their excellent documentaries I like to watch ARD Mediathek IPTV. However there are several problems with this when you live at the opposite side of the world. ARD has a block for any films that are 15+ years outside of 20.00h-6.00h GMT+1. Which makes it pretty much impossible to watch at a reasonable time in Australia. I also like to watch these things on the plane which requires download of the media files.

Install JSON Parser

sudo apt-get install jq

Download script

wget https://github.com/leogaggl/media/raw/master/download_mediathek.sh
chmod +x download_mediathek.sh

Usage

./download_mediathek.sh -f save_as_filename.mp4 -q 3 MEDIATHEK-URL

The -f and -q parameters are optional.
-f filename.mp4 (or full path + filename to save in different directory). Defaults to original filename
-q quality setting from 0 to 3 (where 0 is lowest and 3 highest quality). Defaults to highest quality

Please leave a comment if you find any issues or log an issue on GitHub.

NOTE (2014-07-06): If you are only interested in the Tatort series I suggest you look at this script by Felix Knecht (see comment below)

Upgrading Nokia X to CyanogenMod 11 (via Ubuntu)

The Nokia X seems to be a nice piece of hardware for just around $125 AUD. Nothing spectacular in terms of computing power, but much better build quality than your average cheap Chinese Android clone. I have always been a fan of Nokia hardware until they decided to commit suicide by firstly adding CEO Stephen Elop and ditching all of their software for Windows Mobile.

The problem with the device out of the box is that is has a horribly butchered version of Android. And by horribly I mean way worse than the usual bloat and crapware that poor Samsung, HTC or Sony users are normally subjected to. Hopefully this is only Nokia’s first step to a more open platform, but I wouldn’t hold my breath on that one.

Before committing to buy this device I made sure that I could flash it to CyanogenMod as soon as it arrives. Sidenote: I purchased from Mobicity AU – which turned out to be a big mistake. Do yourself a favour and go somewhere else unless you have weeks to wait.

Nokia X - CyanogenMod 11

Boot Mode – Nokia X

Nokia Recovery Mode:

1. Turn off your device
2. Press Volume + and Power Button 15 seconds

Dependencies

If you haven’t got the Android SDK or tools yet you need to install

sudo apt-get install android-tools-adb android-tools-fastboot

USB Configuration

sudo vim /etc/udev/rules.d/51-android.rules
#add the following line
SUBSYSTEMS=="usb", ATTR{idVendor}=="0421", MODE="0666", OWNER="plugdev"
sudo service udev restart

vim ~/.android/adb_usb.ini
#add at the end of the file
0x0421

sudo adb kill-server
sudo adb devices

Rooting the device

Download ClockWorkMod Recovery (or TWRP if you prefer).

http://forum.xda-developers.com/showthread.php?t=2703708

Check USB debugging in “Settings –> Developer Options” (it seems that the NokiaX has debugging enabled out of the box)

Boot into Recovery (see above)

sudo adb reboot bootloader
sudo fastboot -i 0×0421 flash recovery cwm-6028-normandy.img
sudo fastboot reboot

Installing CyanogenMod 11

Please note that currently this is not an official CM release but an unofficial port, however CM has already committed to taking this device onboard as an officially supported one in the near future.

EDIT 2014-06-17: WIFI is currently not working which should be a showstopper for day-to-day use.

Boot into Recovery (see above) – this should now be CWM Recovery rather than the previous Android Recovery.

Download files:
CM 11 ROM for Nokia X (Android 4.4.2)
Google Apps for CM 11

EDIT (2014-09-29): There seems to be a more complete version of CM11 here: http://forum.xda-developers.com/nokia-x/development/rom-cyanogenmod-11-m8-4-4-4-t2838336

In CWM recovery, select “Data Wipeout / Factory reset” option and wipe the data.
Select “Wipe Dalvik cache” from the Advanced Option
Select “Install ZIP –> Install ZIP from sideload”

sudo adb sideload cm-11-20140426-UNOFFICIAL-normandy.zip

Select “Reboot system now”

Note: the reboot can take about 1 minute to get started due to a bug in the current CWM Recovery.

Enjoy !

EDIT 2014-07-22: Since there doesn’t seem to be any active development on the CM port for Nokia X (which seems a shame since they are so cheap) I found an AOSP ROM (based on Android 4.1.2) which seems to be workable as a day-to-day phone.
ROM Download: http://loki.rombitch.com/Devs/Dhacker29/NokiaX/msm8625-ota-eng.dhacker29-custom.zip
Discussion: http://forum.xda-developers.com/showthread.php?t=2710107