Lately I’ve been taking privacy much more seriously than before. I no more think that I have nothing to hide, so every damn company can collect, analyze and sell every single thing I do online and offline in my private life.
I try to use Google a little less, I don’t use Facebook anymore and keep its cookies away with Privacy Badger and other similar extension, but I keep in my pocket every single moment (nearly) an Android phone, with Google (which I love) tentacles all over it.
So what to do with it? Throw it away like in the picture? Go back to the good ol’ Nokia 3310 and play Nibbles? Or try to find a an alternative, maybe with some tradeoff on some services?
Being always very curious and often greedy of new stuff I kept my ears wide open, and finally a voice came. It was from eelo, now /e/ foundation: your data is your data. Let’s build a mobile operating system unbound from great advertising companies which doesn’t track everything you do.
/e/‘s goal is to build a mobile OS, based on the open source android, completely open source and based on open components and applications. The idea comes from Gaël Duval, known in the first history of Linux for building Mandrake Linux, which then became Mandriva. You can read the full history on Medium or on /e/ foundation website.
I desperately wanted to try /e/, but the final list of officially supported devices didn’t include the only spare smartphone I had, Xiaomi Redmi 3 (codename ido).
Fortunately, right after they published the first MVP release, they also made a nice wiki page on how to build /e/. It’s a super easy tutorial which explains how to create an /e/ image (based on LineageOS, formerly CyanogenMod) for one or more devices. The tutorial is very easy, it ends up with a single command which fetches a Docker image which does everything (really, everything) for you. So nowadays building /e/ is just a matter of resources.
That’s the core point of the activity: resources. I can’t recall where I red it, but compiling Android takes quite a lot of space. And of course CPU time. I didn’t have much space on my laptop, so I decided to give a try on a Contabo VPS we use at work for websites development, so not really trafficated.
Let’s build /e/
A little modification of the command in the tutoria in order to build for ido, and that’s all:
root@www:~# docker run \ > -v "/e/src:/srv/src:delegated" \ > -v "/e/zips:/srv/zips:delegated" \ > -v "/e/logs:/srv/logs:delegated" \ > -v "/e/ccache:/srv/ccache:delegated" \ > -e "BRANCH_NAME=eelo-0.1" \ > -e "DEVICE_LIST=ido" \ > -e "CUSTOM_PACKAGES='GmsCore GsfProxy FakeStore Telegram Signal Mail BlissLauncher BlissIconPack MozillaNlpBackend YahooWeatherProvider AccountManager MagicEar > th MuPDF OpenCamera eDrive Weather Notes Tasks NominatimNlpBackend Light'" \ > -e "SIGNATURE_SPOOFING=restricted" \ > -e "OTA_URL=https://ota.ecloud.global/api" \ > -e "REPO=https://gitlab.e.foundation/e/os/android.git" \ > registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest Unable to find image 'registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest' locally latest: Pulling from e/os/docker-lineage-cicd 05d1a5232b46: Pull complete ed23c9b9366d: Pull complete 594a712a27a4: Pull complete 3e6e2b23590b: Pull complete b68651b12ec6: Pull complete 3bd4400f85d4: Pull complete 204bb65863eb: Pull complete c6152393df59: Pull complete 5ece5e4cbc83: Pull complete ec7e264b7735: Pull complete c12809714229: Pull complete 326ad0e2cc4e: Pull complete b6b5b1ba66ca: Pull complete
Digest: sha256:d80a200bac845f7393bd91da1c17d2d5feb2b172b5ed49a9dba0c698045c6c28 Status: Downloaded newer image for registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest Set cache size limit to 50.0 GB >> [Fri Oct 5 19:43:55 UTC 2018] Branch: eelo-0.1 >> [Fri Oct 5 19:43:55 UTC 2018] Devices: ido, >> [Fri Oct 5 19:43:55 UTC 2018] initializing branch repository >> [Fri Oct 5 19:44:04 UTC 2018] Copying '/srv/local_manifests/*.xml' to '.repo/local_manifests/' >> [Fri Oct 5 19:44:04 UTC 2018] eelo v0.1 use branch cm-14.1 on github.com/TheMuppets >> [Fri Oct 5 19:44:04 UTC 2018] Syncing branch repository >> [Fri Oct 5 22:08:35 UTC 2018] Applying the restricted signature spoofing patch (based on android_frameworks_base-N.patch) to frameworks/base >> [Fri Oct 5 22:08:50 UTC 2018] Setting "UNOFFICIAL" as release type >> [Fri Oct 5 22:08:50 UTC 2018] Adding OTA URL overlay (for custom URL https://ota.ecloud.global/api) >> [Fri Oct 5 22:08:51 UTC 2018] Adding custom packages ('GmsCore GsfProxy FakeStore Telegram Signal Mail BlissLauncher BlissIconPack MozillaNlpBackend YahooWeatherProvider AccountManager MagicEarth MuPDF OpenCamera eDrive Weather Notes Tasks NominatimNlpBackend Light')
>> [Fri Oct 5 22:08:51 UTC 2018] Using OpenJDK 8
>> [Fri Oct 5 22:09:40 UTC 2018] Preparing build environment
>> [Fri Oct 5 22:10:02 UTC 2018] Starting build for ido, eelo-0.1 branch
>> [Sat Oct 6 07:12:01 UTC 2018] Moving build artifacts for ido to '/srv/zips/ido'
>> [Sat Oct 6 07:12:14 UTC 2018] Finishing build for ido
>> [Sat Oct 6 07:12:14 UTC 2018] Cleaning source dir for device ido
Funny notes: /e/ (yes, I agree it’s a really bad naming choice) was originally named eelo, but they were forced to change the name due to a copyright claim. Also, as said, /e/ is based on LineageOS, and the docker image is of course named after it. Even more funny it still keeps some part of the old CyanogenMod naming (cm-14.1).
What does it takes to build /e/
As you can see from the log above it took aroud 11h30m to build the Android image. That’s quite a lot of time! Let’s see in deep where did this time go with the help of some images captured from Zabbix monitoring.
The first hour has been spent in fetching data from internet. Bits more than five minutes to pull the docker image, and then one whole hour full throttle at 100MBit/s to download /e/ sources.
The server ended up with +90G of space taken. So around 22:10 CEST (00:10 in the graphs) the real build started.
The server crunched /e/ (Android) sources for 8h30 minutes. That’s quite a lot! While I’m very happy with Contabo’s VPSes (price/offer ratio is uncomparable), I really cannot say the hardware performance is lightning fast, so I bet this time can be reduced with some more performant hosting. Also the building machine had mechanical disks with SSD cache, which certainly didn’t help the process.
I’ve made available the image for download at e-build.maxxer.it, on the very same Contabo server. I’ve just flashed the ROM on my Xiaomi Redmi 3 (ido) and it’s not bad! More feedback to come in the next days!
Header photo by Stanislav Kondratiev on Unsplash