Goodbye, Google: An Open Source Android Phone

Published on Wed, 7 August, 2019 | 1600 words
Tags: self-hosting android lineageos hardware

It’s been a while since I actually did this, and I only recently realised that I didn’t blog about it. So here goes!

I’m quite a firm supporter of repairable tech. Phones irk me particularly, as <accent type="hovis”> when ah were a lad </accent> the one thing you could always do was take the battery out and replace it, and not being able to do that is a deal-breaker for me. These days, phones come not just glued shut rather than screwed, but the battery is hidden deep beneath layers of metal and plastic, and you need specialist tools to get it out. The battery is always the first thing to go, and you can double the useful life of a phone very easily if you can just replace the battery. But, obviously, manufacturers have a financial interest in you not being able to do this.

I’m also a firm believer that you should own your tech. I root everything, and you should do too. You should be able to scrutinise everything your devices are doing, at all times, and nobody, even the manufacturer, should have more power over it than you do. You’ve paid for it, it’s yours.

When I had the need to replace my mobile phone, a Lumia 435, as Windows Phone is going out of support at the end of this year, I decided that buying a new phone to replace my perfectly-usable-if-a-bit-insecure existing device was certainly against at least one of my beliefs. In response to this, rather than buy a brand new phone, I made my own phone out of old bits, and it really wasn’t that hard.

A home-made Samsung S4 mini, running LineageOS 15.1

For various reasons, I have a lot of spare parts for the Samsung Galaxy S4 Mini. I’ve had two of them, as has my better half. I’ve not thrown any of these away. They’ve all been replaced because of some kind of hardware malfunction, and we both just like the S4 mini, it’s a nice phone, which fits in your pocket well, unlike the modern mammoths, and - from my point of view - it’s really easy to root and install your own OS on. So I basically took all the bits from the various phones I had, and built one working phone out of them, just like I used to do with PCs back in the late 1990s. A factory reset had it running Samsung’s custom Android, which does not work at all these days. Most websites use certificates the S4 has never heard of, and there’s something in the Samsung stock image which causes it to randomly get really hot and go through battery life like it’s going out of fashion. But, despite the age of the phone, the hardware is still perfectly good, and it’s only the software that limits it. So a new OS was obviously needed.

LineageOS

Obviously, I turned to LineageOS. LineageOS is the successor to Cyanogenmod, which I’ve got on three of my earlier Android devices (including an Amazon Kindle Fire!) There’s no official LineageOS build for the S4, but the instructions for installing a custom compiled image are available on the website, and there are various ready-compiled builds available that work perfectly, at least up to LineageOS 15 (aka Android 8.1 “Oreo”). Just search for one of the following depending on the version of S4 you have…

Phone Model Phone Codename Marketing Name
GT-I9190 serrano3gxx S4 Mini
GT-I9192 serranodsdd S4 Mini Dual-Sim
GT-I9195 serranoltexx S4 Mini LTE (aka “4G”)
GT-I9195I serranoveltexx S4 Mini LTE Value Edition

Be careful with the last two, I somehow ended up with one of each and although they are almost indistinguishable from each other, the image for one will not work on the other. Get on over to the XDA Forums to download an image for your particular device. This is a good site that seems to be pretty free of arsehats. Googling “s4 mini lineageos” or similar will get you some 20-odd sites trying to convince you to either download and install their image, which probably contains some dodgy malware, or click a hundred links all of which gain you nothing but get them ad revenue. XDA is pretty much the only site I ever go to for information on modifying Android devices.

The most common thing to do after installing a new ROM is to install a GApps package. This gives you access to the Google Play store, and a load of other Google apps, such as Maps, YouTube and the “OK Google” voice assistant. But the good thing about Android being such a mature platform these days is that there is at least one good alternative for pretty much everything. So I decided to see if it was possible to build an Android phone with absolutely no Google software on it at all.

F-Droid

Instead of Google Play, I installed F-Droid. It’s basically the same idea, but all the apps are open source and therefore (at least theoretically) more trustworthy. It’s hard to decide which apps to install these days, as most of them are after your personal data, money, or both. But F-Droid, for now at least, seems to be pretty free of these, and is full of apps written by people who just like to write apps and give them away for free. Most of them have optional “buy me a coffee” links, where you can make donations to the authors via PayPal or similar, which is a far nicer system than ramming adverts down your throat. Once you’ve got F-Droid and had a look around, you’ll start to notice that pretty much every app you might want on your phone has a free, open source alternative. Here are some suggestions that I use…

Closed app OSS substitute
Chrome Fennec F-Droid
GMail K-9 Mail
Google Keep or Evernote Joplin
Google Talk Xabber
Google Maps OSMAnd

If you really miss your Facebook or Instagram ‘apps’, there are sandbox apps available on F-Droid that are simply extra web browsers that surround the Facebook and Instagram mobile sites (which in most cases are identical to the apps), allowing you to use these services without your other web history being available to them.

Plus, if you feel like the ultimate “freedom phone” challenge, you can set up your own NextCloud or OwnCloud server and use the apps DAVx5 and ICSx5, as well as the built-in contacts app to sync your calendar, tasks and contacts to your own, private cloud server, rather than hand all your data over to Google. If this sounds like too much hard work, many of the apps I’ve mentioned - in particular Joplin - will do end-to-end encryption and sync with various cloud services. So you can set it to encrypt your notes on your phone, using a password that is never entered into a website or transmitted anywhere, and upload the encrypted notes to your Dropbox account, safe in the knowledge that Dropbox (probably) can’t read them.

Look and Feel

I feel I need to mention this - there is a developer known as ChYK who creates Android launchers. I found this developer when looking for a way to make my Android phone look like my old Windows phone, and the app “Square Home” is the way to do this. However, this dev also has a wonderful launcher known as “Total Launcher”, which is by far the most customisable Android UI I’ve seen. You can basically make the UI look and react in any way you can think of, and all with no programming knowledge - great for control freaks like myself. If you don’t have imagination, you can choose from many pre-created themes.

Not only are the launchers top class, the dev is one of the good ones too… the launchers are free and contain no adverts or spyware, but you can add a couple of extra features by purchasing a ‘key’ app from Google Play (which is under £4) plus the official website actually lists every single Android permission the launchers need, and why the permission is needed. The software is not open source, but the developer is about as open as they get, which makes me happy. Obviously if you’re following my “no Google products” rule you won’t be able to install the software directly because you have no Play store, but if you’re a dab hand with ADB you can install on a different Android device and then transfer the APK file to your Google-less one. Please do be sure to purchase the key app though, even if you don’t need the extra features… devs like this should be rewarded for their good work in my opinion.

I’m now completely happy with my phone. OK, I miss old-school features like slide-out keyboards and the PC-like functionality of older mobile OSes like Windows Mobile 6, and I will always hate touchscreens. But I’ve proven - to myself if nobody else - that it’s not necessary to buy a new phone these days. Old ones work just as well, provided you’re prepared to put in a small amount of extra work. Good for the wallet and less electronic waste going to landfill. The fact that I built this phone from parts as well as having nothing but free, open source software on it, just makes me happier.