Sunday, 26 October 2014

Alternative Operating System (Cyanogenmod) on Samsung S4 mini

My Samsung S4 mini Android mobile phone works very well, but it keeps running out of internal storage space for applications, so in practice I can not have very many of my own applications on the device.

I realised this is because the phone came with a lot of applications pre-installed, which keep getting updated, and the updates take up storage space (in addition to the factory installed version, which is not replaced).   And I don't use most of the applications that are installed on it - no need for things like Google Maps when you can use OsmAnd navigation etc. whcih uses OpenStreetMap data so is more detailed.

So tonight I decided to try installing cyanogenmod, which is another build of Android that can replace the factory firmware.    I found this a bit nerve wracking because I was doing it as a bit of a 'black box' - download this file, press these buttons etc.   There are also several versions of a S4 mini (mine is a GT-I9192, which seems to be less common).   If I were doing it on a Windows computer I would be very worried about viruses etc. - still nervous about the firmware that I have downloaded - might try to build it from source another day to give me a bit more confidence.

The end result is my phone seems to work, running cyanogenmod 11, which is good

Don't treat this as instructions of how to do it - it is just my notes so I can remember.

Recovery Image
The S4 mini has a recovery mode, which seems to be a very small operating system.   You need a replacement for this which will let you do more  things (like backup your existing firmware before you start anything more serious).
There are a few different alternative recovery systems around, but the one I found that claims to work on an I9192, is called 'Philz' which is a more advanced version of one called 'clockworkmod'.

I got the latest version of Philz recovery from the link here.    And loaded it onto the device using the 'heimdal' software running on my xubuntu linux laptop (I just used the ubuntu packaged version rather than building from source) - I did this by following the instructions here.

It is now possible to boot the phone into recovery mode by pressing the Volumme Up, Home and Power buttons when booting.

Install Cyanogenmod
The extra worrying part is that you need the version of cyanogenmod that matches your phone (not sure what will happen if you don't, but it might take a bit of recovering from...).   I searched the internet to find an unofficial version for my phone (GT-I9192), and got the latest version from here, which is referenced from a post on the xda developers forum.

This went surprisingly smoothly - you can set the recovery program to install a 'zip' image from sideloader, and send the image using 'adb sideload '.

Re-booted and the phone works again, phew!.

Google Apps
One issue with the 'stock' cyanogenmod is that it does not include any of the propriatory google applications, in particular I wanted GMail, Google Plus and the play store.
While it is possible to back them up from the factory firmware, and then restore them into cyanogenmod, you can get pre-packaged versions on the internet (may be issues with licencing here I suspect...), which are packaged as 'gapps' and can be loaded as a 'zip' file the same way as cyanogenmod.

This now gives me a working gmail etc., and i can install other apps like osmand, national rail etc. using play store.

Unfortunately I have installed loads of other google apps that I don't really want, which slightly defeats the object of  going to an alternative firmware - I might have to look at doing the backup and restore bit myself and being more selective about what I back up....

So, I think I have got back to a working phone - I'll have to test it a bit this week before I go travelling again and need it more.

No comments: