FP3 custom rom development based on released source code

No, that is not the case. I thought of it, and did a second backup of these partitions with TWRP, and could check that the second time they had the same checksum as my own images from dd. The content on these partitions definitely changed, but I cannot see how nor why. And the incident with the OTA updates happened long before the TWRP image was even available, so that is not either the cause of the mismatch in the contents of the first TWRP backup and my own.

Also the mismatch in the name of the partition is probably due to a mismatch between the name of the partition and the mount point. I think modemsti is mounted on /efsi, and i stands for 1, 2. So TWRP naming convention seems to follow the mount point naming instead of the partition naming.

3 Likes

modemst1, modemst2, fsg and fsc are all backed up when you select “EFS” in backup:

As for the contents changing, TWRP isn’t touching these, so it must have been the OS.

1 Like

Hi all,
Do you still need older firmware binaries?
My phone never had an internet connection & sim card and is still on 8901.2.A.0096.20191001.

1 Like

That would be helpful indeed.


Different topic:
There are more 9853 programmers here: https://github.com/openpst/assets
https://github.com/bkerler/edl and https://github.com/openpst/sahara say that FP3 has no fuselocked PK_HASH

2 Likes

yes, it would be great to have a list of all historic firmwares. the older the better - we can always patch an old firmware to a newer one with any of the delta patches, but going back in time is not possible. So in theory all we need is the oldest firmware ever and all the OTA diff URLs ever issued since :wink:

(That rises an interesting question - do the OTA diff URLS ever expire?)

1 Like

Does that mean we can upload our own community key, re-sign sdl and aboot, as well as community created boot partition and then have the phone locked and fully protected with a non-stock operating system? That’d be cool!

6 Likes

That means that every programmer should get accepted.
We don’t get prog_emmc_firehose_Sdm632_ddr_meiz1.mbn running, though.

1 Like

Theoretically yes, but that’s very risky since the fuses can only be set once.
It does mean though, that sbl1 isn’t verified and it should be possible to load any firehose-programmer in EDL mode (given you find a working one for sdm632)

1 Like

I wrote a little script for installing TWRP and magisk aka rooting:


The output looks like this:

File 'twrp-3.3.1-0_k4y0z-20200202-02-fp3.img' already there; not retrieving.

File 'twrp-installer-3.3.1-0_k4y0z-20200202-02-fp3.zip' already there; not retrieving.

File 'Magisk-v20.3.zip' already there; not retrieving.

downloading 'boot.img'...
OKAY [  1.139s]
booting...
OKAY [  7.334s]
finished. total time: 8.473s
Total xfer: 1.06x                                                          
Total xfer: 1.45x                          
Flashed TWRP and Magisk
Rebooting to device...
3 Likes

prog_emmc_firehose_8953_ddr_redmi7.mbn works with FP3.
I only tested printgpt with edl.py so far

1 Like

Seems like we found a working programmer, will update you when we have done some more tests

1 Like
5 Likes

Thanks for doing this important work! Can anyone guess how long this development will take approximately? My FP2 starts to fall apart and I would really like to switch to a FP3 running LineageOS. Are we talking about weeks or months or is it impossible to foresee the development time at all?

If you are feeling adventurous, you could try it right now …


This. Better expect nothing and be pleasantly surprised than expect something and be disappointed :slight_smile: .

Thanks to all the experts here for the huge progress in the last few weeks.
Unfortunately I only have little time at the moment to participate and it’s been some time since I’ve worked on Android system development. But I want to try to dig little into LOS.
Dumb question to the experts: Wouldn’t this config https://github.com/LineageOS/android_device_motorola_river or this https://github.com/LineageOS/android_kernel_motorola_sdm632 respectively a good one to start with?

2 Likes

you can start with the river devicetree, but you need to take the FP3-kernel.

1 Like

Yes sure. I set up a device tree based on the Motorola platform now: GitHub - mstaz/android_device_fairphone_FP3: Android / LineageOS 16 device tree for Fairphone 3
I extraced the binaries with extract-files.sh from @k4y0z’s full dump:

Configs and makefiles seem to be parsed successfully so far.
This is my try to start development on LOS for the FP3 :slight_smile:

However build fails because of errors in kernel sources.

…/…/…/…/…/…/kernel/fairphone/sdm632/drivers/media/platform/msm/vidc_3x/msm_vidc.c:1381:2: error: function definition is not allowed here

Seems that there are some crazy non-standard nested functions used:
https://github.com/FairphoneMirrors/android_kernel_fairphone_sdm632/blob/master/drivers/media/platform/msm/vidc_3x/msm_vidc_common.c#L732
@k4y0z didn’t you face the same errors?
Maybe another compiler is used for LOS.

3 Likes

You need to use the compile-branch:

3 Likes

Thanks for the hint. I’ll try that tomorrow.

I built a new kernel based on k4y0z’s and reverted the kernel config: https://github.com/basxto/android_kernel_fairphone_sdm632/commit/a4b10ea6bbee9cb3d1d945567a20400e0e5eaee7
My phone is running with 101 stock (also works with 110), LOS16 as system and custom kernel + twrp on boot.
Not working:

  • camera
  • flash light
  • WiFi
  • calling somebody or getting called ended with a black screen

Working:

  • bluetooth
  • LED
  • buttons
  • display resolution
  • turning display back on
  • GSM (f-droid synced over GSM)
  • ethernet over usb-c via adapter
  • receiving sms
  • seeing that I get called
  • NFC
  • fingerprint sensor

It takes an eternity to boot up, but I think that’s because the camera does not work.
If you use fastboot boot and want to boot into your custom twrp, you have to reboot your phone into recovery mode and hold the volume down key. Otherwise it will skip the initramfs.

6 Likes