What would be required for a port to Fairphone 5?

Hello there,

I am a long-time user of SFOS, on J1, FP2, Xperia 10 III… But in parallel I always owned Fairphones (some on Android) which I consider the most ethical choice, and therefore I daily-drove a FP2 a long time with SFOS.
Now I am trying to follow the porting efforts to the FP4 by @mal and @dimac4455. But as far as I can tell, the port by @dimac4455 doesn’t offer encryption and has some other hiccups and for @mal’s port it isn’t foreseeable when it will be released (which is totally OK, as it is a project in the freetime and additionally @mal is involved in so many other valuable projects that maybe the priorities are somewhat others than mine :wink: )

As I don’t want to start a third port for the FP4, I am considering getting my hands on a FP5. But: I am not sure what it might take to port SFOS to this device. (Note: I have never done something like this before, but I followed @vlagged’s efforts and therefore I understand that the process isn’t as easy as a one-click-trick.) The main problem, as far as I understood so far, is that the HADK is written for devices up to Android 10 (plus build instructions for Xperia 10 III on A11). The FP5 is on Android 13 at the moment. As I have no insight into porting efforts by @mal and @dimac4455, I can’t estimate whether the HADK can still be applied or a totally different approach would be necessary. Furthermore, the FP5 isn’t supported by pure LineageOS (yet?). But: murena as well as iode offer their OS for the FP5 (and both are normally based on LineageOS, afaik.

So, I have found:

  1. The source code for Android itself https://code.fairphone.com/projects/fairphone-5/android.html, althogh they claim that it lacks some bits and is not buildable yet (Fairphone 5 source code release - Development - Fairphone Community Forum):

The source tree contains all Android and Linux kernel sources that we can publish, excluding some proprietary components. The public source tree also does not contain proprietary third-party apps such as the Google Mobile Services.
For now the sources are not buildable yet, this will follow at a later stage.

  1. The kernel source code: https://code.fairphone.com/projects/fairphone-5/kernel.html#fairphone-5-kernel

I don’t know if the lack of LineageOS can be compensated by iode’s or murena’s Android derivatives:
3. Murena (/e/): https://gitlab.e.foundation/e/devices/android_device_fairphone_fp5
4. iode: https://gitlab.com/iode/os/public/devices/fairphone/device_fairphone_FP5

Furthermore, there is @mal’s repository which seems to have some work done for support of Android 13, but as the commits are 10 months old, I don’t know whether they will be helpful for me.

Could anyone with more insight than me give me a hint what else I would have to consider?

6 Likes

A better place for questions of porting to a new device would be the sailfishos-porters channel. Sailfish OS IRC channels moved to oftc.net

5 Likes

Have you checked out my getting started guide? There is also a WIP docker available to setup the SDK and build files for you. The process of starting a new port is a lot of work unfortunately, but don’t be discouraged! Feel free to contribute to this repo if you’d like.

In addition to mentioned ports I also know of CalyxOS

1 Like

I have one FP5 which I plan to use for porting hopefully quite soon. I found some unofficial LineageOS repos which hopefully work I could use for testing. I was hoping the official Android release from Fairphone would become buildable at some point and to use that as base but not sure if/when that will happen so probably lineage is a good starting point for me assuming those work. Using Android 13 as a base needs some additional things which are not well documented yet but it’s doable as I’m the one who added support for and i have used for device porting already.

13 Likes

You can also use the Halium (11, because of device’s vndk version) as a porting base and structure the port in a similar way to Fxtec Pro1-X and Volla 22 ports by @piggz.

I’ve been working on getting FP5 kernel compiled for Ubuntu Touch, and that part should be mostly reusable for SailfishOS: UBports / Porting / Community Ports / android11 / Fairphone 5 / fairphone-fp5 · GitLab

4 Likes

Thank you all for your input!

I am afraid it will stay some more time in the unbuildable state, as confirmed by a FP-employee here:
https://forum.fairphone.com/t/fairphone-5-source-code-release/99616/15:

Thanks for you patience, unfortunately it will still take some time for us to wrap up this topic properly, say Q2-Q3 2024.
To clarify things, the currently published source tree is as complete as it gets, we published everything we legally can, everything that’s not proprietary in some way. The major change we’ll need to do is to restructure the source tree in a way that it can be built without proprietary dependencies (toolchains, headers, etc), and move those proprietary components into a blobs package, as we’re doing for the previous devices already. This is complex, because the source tree as it comes from suppliers is typically not set up in a way designed for open sourcing.

@dimac4455 thank you for the link to your getting started guide. I already had a look at it, but at first sight I couldn’t figure out if there are A13-specific things in it, and as @mal confirmed, there are some pieces missing for A13 in the HADK. Could you give me a hint which things were done differently to the HADK?

Thank you for this suggestion! I am not familiar with this route (I saw the post by @piggz, but due to no example like in the HADK I don’t feel able to estimate what effort this would take). Could you give me a link for reading something that I could make myself familiar with this approach? I didn’t find anything, but maybe I searched for the wrong things…

You are right, but I wanted to share my thoughts and findings here first and get some feedback, as I wanted to be able to ask the right questions on the porter’s channel :slight_smile: But if I decide for trying, I will go there and ask my questions.

1 Like

But maybe you could share your plans with the FP4? I don’t think that a port for the FP5 by me could be only near as stable as I know your port (fir the FP2) is. In the case that you are planning to release it in a foreseeable time frame, I don’t see a point in making a worse port for the FP5 by myself.

Since you asked for feedback: Yes please, a port of SailfishOS to Fairphone 5 would be highly appreciated! :smiley:
I have seen some screenshots of PostmarketOS and Mobian running on the device, Ubuntu touch is booting already and Luca Weiss from Fairphone is constantly mainlining new drivers/configurations for the device. I hope this will help the porting in the long run.

I actually have Sailfish OS running on top of mainline linux kernel on Fairphone 5, of course it’s not something that could be released to public because too many things are not working. That project is not related to making regular Sailfish OS port for Fairphone 5.

6 Likes

Well, you seem to have a lot of very interesting projects! For me the most interesting fact would be whether a release is planned for the FP4 in the near future, because I am sure that I wouldn’t be able to make a port for the FP5 in a quality that only comes close to the one I know from your port for the FP2. If a release for the FP4 is around the corner, I don’t see a point in starting a port fir the FP5 myself (which would take ages due to no experience on my side), as I don’t really care whether I have a FP4 or a FP5, as long as it runs SFOS properly.

1 Like

As stated earlier in another thread I am going to apply to an NLNET grant to port Sailfish OS to FP5. I know usually @mal has a head start on this but also he may not have the time with all the other stuff that he’s doing.

If you have input on the application please comment on codeberg in the next days, probably 15-16 March I will post it.

LE: application posted

7 Likes

15-16 March Salfish Port???

No, NLNET grant to port Sailfish OS to FP5