FP3 custom rom development based on released source code

Now I booted into ArrowOS with 110 stock and custom kernel.
Camera and flash light work this time. But WiFi and calling still does not work.

I was able to make some progress. However not too much so far :frowning_face:

With the new released sources for kernel and audio techpack I was able to build LOS16. Also I was finally able to flash and run it on my device. As expected nothing is working yet. Means no display at all.
However ADB can be accessed and logs from dmesg and logcat already look quite promising. After some time device automatically reboots.

What drives me little crazy is this Android Verified Boot stuff. Sometimes the bootloader automatically switches back to the other slot before anything is even loaded. Can’t even start TWRP on that slot then. After some flashing (stock dump, vbmeta, LOS images) I get it running somehow, but I didn’t got an idea what is the relevant thing here. Is someone aware of this AVB stuff and can explain how to deal with it during development?

Would be nice if someone could give it a try and help me with it. Next thing for me would be to get the display running.

3 Likes

Did you do adb disable-verity for AVB ?

I couldn’t even boot to TWRP for that slot. However maybe it also helps to do it from other slot. I’ll give that a try next time it happens. I have the feeling that it’s related to rollback protection.

adb disable-verity should disable verity for the two slots.

If you can’t boot to TWRP maybe you should check the “success” status of the slots.

Thanks a lot for trying this. Is there somewhere a guide to help to port lineage?

I can boot to TWRP with the other slot active. “success” status also has an influence on that, just as with flashing GSI images. However I don’t completely understand the checks the bootloader performs before loading the boot image and starting it.

There is the official Android documentation of course. Build system, tools etc. is pretty much the same for LOS. There is just some additional stuff.
For setting up the build environment an existing LOS build how-to can be followed, e.g. for the Motorola G7 what has the same processor platform.
For the configuration I did so far, I tried to write some notes in the readme, but this is far away from complete :wink:

1 Like

It seems Verified Boot has been implemented by Fairphone
Can you please try to rebuild TWRP with these kernel defconfig flags disbaled

https://github.com/mstaz/android_kernel_fairphone_sdm632/blob/38de92e4740862caa6b79bc4816e6405a0c7b43f/arch/arm64/configs/fp3_stock_defconfig#L4888-#L4890

CONFIG_MODULE_SIG_KEY=“certs/signing_key.pem”
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""

You can follow this post here to build twrp yourself

For OS side you will have to unpack stock boot.img diff initscripts and fstab remove any verity checks here .

From your tree it seems to be okay https://github.com/mstaz/android_device_fairphone_fp3/blob/master/rootdir/etc/fstab.qcom#L36

I will my receive fairphone 3 in 1 week looking forward to join the development .

1 Like

Those configs are used for kernel-module signing. Why do you want to disable that?
TWRP doesn’t even use any of the kernel-modules.
If you want to use prebuilt kernel-modules in OS I have added the fairphone-certificate here:

You are right , i did not look into the description of these flags.
The suggestion was based on the commit here https://review.lineageos.org/c/LineageOS/android_kernel_nvidia_linux-4.9_kernel_kernel-4.9/+/265445

BTW, I saw in the /e/ community forum that they want to port their OS to the FP3 within the next 2 months: https://community.e.foundation/t/fairphone-3-fp3-support-on-e/6438/72?u=ingo_fp_angel

8 Likes

Did someone record the download URL for 111?

From A.0105 : https://android.googleapis.com/packages/ota-api/fairphone_fp3_fp3/05f054a6029b23dcd171ded487dedb929ae99dc1.zip

The request I’ve intercepted worked for the A.0111 (script)

3 Likes

I am unsure if anybody is interested, but I don’t have the computing power on my T420 or experience to try this, but someone has created a UBPorts halium 9 GSI. It’s in very early stages but the instructions are as follows https://build.lolinet.com/file/halium/GSI/ubports_GSI_installer_v3.zip

  1. Install treble compatible android 9 rom
  2. FORMAT data in twrp
  3. Flash halium-boot.img of your device
  4. Flash GSI zip https://build.lolinet.com/file/halium/GSI/ubports_GSI_installer_v3.zip

if there’s no halium-boot for your device, build it without android environment!

  1. Get kernel source
  2. Patch defconfig using this script: https://github.com/erfanoabdi/halium-boot/blob/master/check-kernel-config
  3. Build kernel and flash it (using anykernel or any other way)
  4. Flash https://build.lolinet.com/file/halium/GSI/tools/halium-ramdisk.zip

you can find more information by joining the creators telegram here: https://t.me/ErfanGSI
and the halium telegram here: https://t.me/halium

6 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.