Felix Elsner

Mobile Projects

I've compiled a small list of my contributions below to give you an idea of what a (hobbyist) Android system developer might be working on. There are many people who put in much more effort and achieve tremendous results, and I have great admiration for them. Having first-hand experience with leading groups, good and bad, I'm happy to stay in the background in Android matters.

Why do this at all?

I like coordinating with others, distributing work and responsibilities, testing and tinkering, setting up build systems and building new tools where needed.

Working together in a team, helping newcomers and discussing interesting architectural challenges is what motivates all of us to give our sparse spare time.

It's great to open your inbox and get mail from all over the world, either with questions or often just a small thank you for helping someone out. I'd wager that I've helped at least a few dozen people get started with Android systems development, and many more passers-by with a specific problem.

Selected projects

AOSP builds and development for Sony devices

The Sony Open Devices Project (“SODP”) is very unique. We strive to create as much open-source components as possible. As opposed to other vendors - who turn a blind eye but could shut down custom ROM projects any time - the work happens with full legal backing from Sony Mobile.

In regognition of my contributions, Sony named me "Hero Open Source Developer" in 2019.

Build and Project Work
  • Feature and bug list management
  • Policing issue tracker, triage
  • Changelog and SODP-wide security bulletin
  • Merging and testing of security patches
  • Support at xda-developers, maintaining chat support groups
  • Introducing and teaching new developers
Contributions to SODP itself
  • Treble compatibility
  • SELinux policy (see down below)
  • Restructuring, getting the device trees in orderly shape for faster iteration
  • Improving the repo_update.sh script
  • Kernel commits
  • Adaptation to newer Android releases
  • Tweaking performance settings and improving reliablitiy

Upstream contributions

I contribute to the Google-led Android Open Source Project (AOSP), OmniROM, LineageOS and many more. It's pretty fun to type your email into GitHub search and see how many hundreds of projects all have your changes.

If you have a device running Android 10 or higher, you already have some of my changes inside!

AOSP Gerrit:

It can take months and tens of revisions to get a change accepted into AOSP. But it is quite rewarding to have your code running on potentially billions of devices!

Android articles

I try to document as much of our work as possible so that we have a working form of knowledge management.

The knowledge base is accessible at Open Devices Corner, generated via the Hugo static site generator, using a forked jeblister/kube theme.

There is a Documentation section with more in-depth articles but also some references like an overview of all currently supported devices, and a Developer Diary section where smaller and day-to-day findings are noted down.

Sample selection

One big issue is handling confidential information. Before any post goes public, it has to be cleared with the people whose work is mentioned, and anything touching non-public information and closed-source components has to have Sony eyes on it before release.

“Project Treble”-enabled AOSP builds

Project Treble is an initiative to allow vendors to more easily keep their devices updated with the latest Android versions, and thus keep their users secure. The device maker provides low-level interfaces from which the Android "system" can run, sort of like a container ship accepting any spec-conforming container. For more information, see this ArsTechnica article.

  • Releases for Xperia XZ, XZs and Xperia X
  • For a more technical explanation, read the Fake Treble for Xperia XZ article.
  • Credit goes to @sjllls for the initial idea and implementation. I am using re-packaged oem binaries into a combined vendor and oem image, while sjllls re-purposes the cache partition as a vendor partition.
  • Based on my work, people have started work on independent suzu builds, see the @suzu-treble project

Thanks to my contributions, SODP devices can run GSIs flawlessly, and my Treble builds allowed for running Android Q on the Xperia XZ on the day the first public GSI of Android Q was released.

Sample commits

Community Page

Part of the success of a great open source project is reaching new users and contributors. For that purpose, and because the official Sony pages tended not to be very inviting or were out of date, I set up a community page to encourage people to learn more about Open Devices. It acts as a central landing page for all people interested in the project and motivates them to actively participate.

The site is available at Open Devices Community Page and offers visitors the opportunity to discover builds for their devices, helps and encourages them to build AOSP for themselves and join the project, links to sister projects and guides people throughout the whole SODP ecosystem.

Key points of interest:

SailfishOS for Xperia XZ

It was a lot of hard work figuring out the byzantine structure of the Sailfish project, but I managed to develop a working port for the Xperia XZ. The build system is not really aimed at hobbyists, but rather at vendors.

Instructions at sx.ix5.org: SailfishOS Installation on Xperia XZ.

Version: 3.0.1.11, using AOSP 8.1 and Kernel 4.4 as a base.
RIL, mobile data, bluetooth, sound, camera, sensors, video acceleration - all working.

@Rinigus has ported SailfishOS to Tama devices based on Android Pie with Kernel 4.9, see sailfishos-sony-tama.

SELinux policy

Broadly speaking, SELinux policy is a mechanism to describe what programs are to be allowed which sets of actions. It helps make a lot of vulnerabilities less exploitable, but a bit of work is involved to observe and decide which actions are really necessary.

I got the SODP sepolicy ready for Android Pie, and subsequently Android 10. There were some dirty hacks and lots of mistakes in the process, but it is in a good state now.

SailfishOS documentation at foresail

Available at sx.ix5.org/foresail.

An effort to improve the horrendous documentation available for SailfishOS builders. Tries to cover Sailfish, mer, mer-hybris, halium, Android parts, Sailfish build tools and more.

Using a customized sphinx theme that resembles the "Just the Docs" jekyll theme.

SailfishOS upstream

Various commits. I've used marina-bay as an organization to gather repos for a quick Xperia XZ SailfishOS port.

Ubuntu Touch & Halium

Ubuntu Touch and the whole ubports project are great to work with. A vibrant and friendly community with a great focus on users. I've contributed to the installer and various other parts.

Ubuntu Touch runs atop the Halium project, to which I've also contributed.

LineageOS contribs & builds

For testing, I built and distributed unofficial LineageOS test builds.

I've used afstamming as an organization to gather repos for an Xperia XZ LineageOS port.

LineageOS Gerrit:

repo_update

At SODP we try not to maintain forks of upstream repositories, we rather use a script to patch them. This saves resoures (less time wasted with merges) and explicitly helps keep track of what we've patched.

I made the script more accessible to newcomers and contributed a patch to allow developers to work fully offline, re-using downloaded data.

Health HAL

Lots of times, you need to write glue code to bridge layers of abstractions. I wrote a health HAL that reports battery and storage status to the higher layers in a HIDL-standardized way over the binder protocol.

With persistent storage for battery wear, measured in cycles and drop in capacity.

Universal Dual-SIM patcher for Sony devices

Saves bandwidth and storage by only having to create one build for both single- and dual-SIM devices.

Download and discussion at the Dual-SIM information page.

Big thanks to @oshmoun for the regex crafting!

ODM Version Checker

Contributed to ODMVersionCheck, a small app for SODP which ensures the Software Binaries flashed to the odm partition are always up to date.

New Android version bringsups

Commits that fix compatibility with newer revisions of Android.

Android 10 bringup Android 11 bringup

Other Commits across SODP

These don't fit in anywhere else:

All pull requests by me: author:ix5.

Debloating scripts for Stock Oreo

Credits to the AROMA creator and @korom42 for creating the base Stock Light ROM Patch.

Available for Xperia XZ on .184 and .192 stock firmware.

Download: lightpatch-v7.3-slim-hero.zip

DSP label fixer

This patcher was not really needed anymore after the Pie release, but was a nice quick exercise getting to know the edify language on Oreo.

For an explanation, see the post DSP file relabling for SODP.

Download: dsp-label-fixer.zip

Closing

There are people way more talented and engaged than me - numerous device and ROM maintainers and system architects, people keeping ancient devices alive, debugging, reverse-engineering, writing probing tools and coming up with insane workarounds, coordinating and teaching.

A small, non-exhaustive list:

For people looking to delve into this world, I say you can learn a lot by observing the work of others; veterans enjoy helping motivated newcomers, but make sure to do your homework! It is also crucial to understand what you are doing, and why. Don't just mindlessly copy and pray something works.