SailfishOS on Fairphone5 application

What follows is the https://nlnet.nl/propose/ application.


Thematic call NGI Mobifree
Project name Developing SailfishOS community port for Fairphone 5
Website / wiki https://sailmates.codeberg.page/47/posts/2024-02-18-sailfish-on-fairphone5/

1. Abstract

Can you explain the whole project and its expected outcome(s).
1200 characters

This Sailmates project aims to bring Sailfish OS to Fairphone 5.

Sailfish OS1 is one of the GNU/Linux alternatives to Android or iOS, along with Ubuntu Touch, Mobian, PostmarketOS and others.
All these GNU/Linux operating system offer the owner control over their smartphone and complete ownership (root access) just as on a desktop/laptop computer.
Sailfish OS can run on mainline kernel if the mobile device supports it (e.g. Pinephone) or on any unlockable Android device through libhybris2, that re-uses the Android vendor bits to make the device peripherals work.
Sailfish OS is one of the most daily-drivable alernative, and has a commercial edition which includes an Android AppSupport container without Google Play Services.
Sailfish OS is usually picked up over Android or iOS by privacy-concious people.

Fairphone is a company that produces phones by “responsible material sourcing” and “advocating for workers’ welfare”, also promoting self-service replacement of parts and 5 years guarantee and 8 years of support. Their latest release is Fairphone 53.
Fairphone also offers the possibility to OEM unlock the device, so that you can install alternative OSes as you would expect on a device that you own.
They also offer detailed schematics for self repairing4.
(There is already a Sailfish OS port for FP4 and FP2 5 and a FP3 Sailfish OS port is in the works 6).
Fairphone is usually picked up by people more eco- and sustainable-concious.

Sailmates is an association to support and promote free and open source mobile operating system alternatives.

2. Have you been involved with projects or organisations relevant to this project before?

And if so, can you tell us a bit about your contributions?
(Optional) This can help us determine if you are the right person to undertake this effort

One of our developers has already ported SailfishOS succesfully using the libhybris2 method on Xiaomi Mi Note 10 and Asus Zenfone 85.
He has also documented each step in the case of Asus Zenfone 87 where you can see that it was around 60 evenings of development time.

Requested Amount (between 5k-50k)

3. Requested support

Explain what the requested budget will be used for?
Does the project have other funding sources, both past and present?
(If you want, you can in addition attach a budget at the bottom of the form)
Explain costs for hardware, human labor (including rates used), travel cost to technical meetings, etc.

The budget will be mainly used for:

  1. Getting a FP5 device 699EUR + standard delivery 15.95EUR.
  2. Working on a port, estimated 60 days4 averaging 4 hours each with a 20 EUR hourly rate: 4800EUR.

There may be other costs involved but slightly unlikely:

  • Breaking of some peripheral due to software mishandling of the hardware (etc. speakerphone damage)
  • Continous update, whenever a new Sailfish OS version is out the repos need to be updated & changes tested (sometimes but rarely requiring new fixes) These will be considered included in the 2nd point above.
Compare your own project with existing or historical efforts.
(e.g. what is new, more thorough or otherwise different)

The previous recent work done by our developers while porting Sailfish OS was adapting Android 10 base and Android 11 respectively to run Sailfish OS.
This work will try to use Android 13 as a base. The Sailfish Hardware Adaptation Development Kit (HADK)8 currently only supports up to Android 11 but there is work started to support Android 13 / Lineage 20 that might need some more tweaking9.
Also the current state of Fairphone FP5 source code release10 is, as retrieved on March 2nd, 2024, that it is not yet buildable, though there is work towards that and some other Android derivates are already out there.

What are significant technical challenges you expect to solve during the project, if any?
(optional but recommended)

Adapting Sailfish OS for an Android device poses at least these technical challenges:

Prerequisites:

  • Source code of Android bits that can be built, and hybris patches can be applied.
  • Kernel source code that can be built into a bootable image

Challenges:

  • Patching the Kernel config with the required parameters needed for Sailfish OS to function
  • Booting the above kernel + access to the booted OS through means of Telnet (very hard to debug anything without)
  • Booting the rest of the Sailfish OS systemd init + android vendor services, debugging any crashes/errors/configuration misphaps
  • Reaching GUI - this means at least the HWCompositor service needs to be able to run currectly, with all its direct or indirect dependencies
  • Wrapping up the rest of the hardware adaptation: Sound, Telephony, Sensors, Camera photo and video recording
Describe the ecosystem of the project, and how you will engage with relevant actors and promote the outcomes?
(E.g. which actors will you involve? Who should run or deploy your solution to make it a success?)

The advancement in the work will be posted on either or both forum.sailfishos.org and sailmates.net.
For debugging aid we will reach out to the #sailfishos-porters OFTC channel on IRC which also has recorded logs11 of previous debugging done by other people.
The adaptation source code and pre-built images will be continously available on github or a similar hosting under an OSI-approved license.
The builds for the OS updates will be made on Sailfish OS Community OBS12.
A daily drivable installation / wiki will be made available when the goal is reached and the support for Sailfish OS on Fairphone 5 will be announced on Sailfish OS Forums and Fairphone Forums alike.

4. Attachments