Fairphone 5 source code release

Initial sync of the Android source tree can take a lot of time and fail in between. Just try running the repo sync command again the way you did, try it a few times.

If it’s still failing, it could be that something got corrupted during initial sync (that sometimes happens, just because of the amount of git projects and data in them). If that’s the case, it might be easiest to just delete your workspace and try again.

2 Likes

Hey, i am new in ROM development and interesting in to how to build stock firmware for my new Fairphone 5.

In official documentation Fairphone 5 - Android Source Code — FAIRPHONE open source documentation i found how to fetch FP5 stock source code, there are two repos. qssi and target. i fetched it successfully. But i didnt found instructions how to build this from source.

This two repo are so confusing me :slight_smile:

I have try to build both repo separetely

When im building fp5-qssi i see this lines

~/fp5-qssi$ source build/envsetup.sh
including vendor/qcom/opensource/core-utils/vendorsetup.sh
~/fp5-qssi$ ./build.sh
============================================
[build.sh]: qssi found in Dynamic Parition Enablement List
============================================
============================================
[build.sh]: Building Android using build.sh for qssi...
============================================
============================================
[build.sh]: QSSI_ARGS=" ENABLE_AB=true SYSTEMEXT_SEPARATE_PARTITION_ENABLE=true BOARD_DYNAMIC_PARTITION_ENABLE=true ENABLE_VIRTUAL_AB=false SHIPPING_API_LEVEL=29"
============================================
============================================
[build.sh]: DIST_ENABLED=false, ENABLE_AB=true
============================================
============================================
[build.sh]: Capturing build performance data...
============================================

When i tring build fp5-target i have this lines

~/fp5-target$ source build/envsetup.sh
including device/qcom/common/cuttlestone/vendorsetup.sh
including vendor/qcom/opensource/core-utils/vendorsetup.sh
~/fp5-target$ lunch fp5-userdebug
vendor/qcom/opensource/audio-hal/primary-hal/configs/lahaina/lahaina.mk:420: warning: "Enabling codec2.0 SW only for non-generic odm build variant"
vendor/fingerprint/focaltech/focaltech.mk:27: warning: “fingerprint in ca”
device/qcom/lahaina/BoardConfig.mk:220: warning: #### QGKI config ####

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=fp5
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo300
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-2a
TARGET_2ND_CPU_VARIANT=cortex-a75
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-116-generic-x86_64-Linux-Mint-21.3
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RKQ1.230130.001
OUT_DIR=out
============================================
~/fp5-target$ ./build.sh
============================================
[build.sh]: fp5 found in Dynamic Parition Enablement List
============================================
============================================
[build.sh]: Building Android using build.sh for fp5...
============================================
============================================
[build.sh]: QSSI_ARGS=" ENABLE_AB=true SYSTEMEXT_SEPARATE_PARTITION_ENABLE=true BOARD_DYNAMIC_PARTITION_ENABLE=true ENABLE_VIRTUAL_AB=false SHIPPING_API_LEVEL=29"
============================================
============================================
[build.sh]: DIST_ENABLED=false, ENABLE_AB=true
============================================
============================================
[build.sh]: Executing a full build ...
============================================
============================================
[build.sh]: Command: "source build/envsetup.sh"
============================================
including device/qcom/common/cuttlestone/vendorsetup.sh
including vendor/qcom/opensource/core-utils/vendorsetup.sh

real	0m0,085s
user	0m0,049s
sys	0m0,057s
============================================
[build.sh]: Command: "vendor/qcom/opensource/core-utils/build/kheaders-dep-scanner.sh"
============================================
 Checking dependency on kernel headers ......

real	0m0,198s
user	0m0,034s
sys	0m0,049s
============================================
[build.sh]: Command: "lunch qssi-userdebug"
============================================

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=qssi
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-116-generic-x86_64-Linux-Mint-21.3
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RKQ1.230130.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=hardware/google/av hardware/google/interfaces
============================================

real	0m1,149s
user	0m1,620s
sys	0m0,692s
============================================
[build.sh]: Command: "make  ENABLE_AB=true SYSTEMEXT_SEPARATE_PARTITION_ENABLE=true BOARD_DYNAMIC_PARTITION_ENABLE=true ENABLE_VIRTUAL_AB=false SHIPPING_API_LEVEL=29"
============================================
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=qssi
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.15.0-116-generic-x86_64-Linux-Mint-21.3
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RKQ1.230130.001
OUT_DIR=out
PRODUCT_SOONG_NAMESPACES=hardware/google/av hardware/google/interfaces
============================================
[100% 1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
Clang SA is not enabled
T2M TARGET_BUILD_MMITEST false
Environment variable BUILD_DATETIME was modified (1721389771 => 1721661381), regenerating...
Environment variable BUILD_DATETIME was modified (1721389771 => 1721661381), regenerating...
[100% 2/2] initializing build system ...
build/make/core/main.mk:368: warning: "Compile using modified AOSP tree supporting full vendor value-adds"
[ 17% 37/212] including disregard/Android.mk ...
Skipping Android.mk under disregard
[ 48% 102/212] including kernel/Android.mk ...
Skipping Android.mk under kernel
[ 88% 187/212] including vendor/qcom/opensource/audio-hal/primary-hal/Android.mk ...
vendor/qcom/opensource/audio-hal/primary-hal/hal/Android.mk: warning: audio.primary.msmnile: LOCAL_COPY_HEADERS is deprecated. See https://a
ndroid.googlesource.com/platform/build/+/master/Changes.md#copy_headers 
[ 93% 199/212] including vendor/qcom/opensource/dataservices/rmnetctl/Android.mk ...
vendor/qcom/opensource/dataservices/rmnetctl/src/Android.mk:9: warning: BUILD_COPY_HEADERS has been deprecated. See https://android.googleso
urce.com/platform/build/+/master/Changes.md#copy_headers.
[ 96% 205/212] including vendor/qcom/opensource/time-services/Android.mk ...
vendor/qcom/opensource/time-services/Android.mk:14: warning: BUILD_COPY_HEADERS has been deprecated. See https://android.googlesource.com/pl
atform/build/+/master/Changes.md#copy_headers.
[ 98% 208/212] including vendor/qcom/opensource/wlan/utils/sigma-dut/Android.mk ...
[ 99% 211/212] finishing build rules ...
vendor/qcom/build/tasks/generate_extra_images.mk:272: warning: ==== device/qcom/qssi/qssi.mk ====
vendor/qcom/build/tasks/generate_extra_images.mk:272: warning: PRODUCTS.device/qcom/qssi/qssi.mk.PRODUCT_NAME := qssi
vendor/qcom/build/tasks/generate_extra_images.mk:272: warning: PRODUCTS.device/qcom/qssi/qssi.mk.PRODUCT_MODEL := qssi system image for arm6

______________ VERY LONG TEXT HERE _____________________

[  0% 214/93773] //system/core/adb:libadb_host static link libadb_host.a [linux_glibc]
FAILED: out/soong/.intermediates/system/core/adb/libadb_host/linux_glibc_x86_64_static/unversioned/libadb_host.a
echo "module libadb_host missing dependencies: platform_tools_version" && false
module libadb_host missing dependencies: platform_tools_version
[  0% 215/93773] //system/core/adb:libadbd_core static link libadbd_core.a
FAILED: out/soong/.intermediates/system/core/adb/libadbd_core/android_arm64_armv8-a_static/libadbd_core.a
echo "module libadbd_core missing dependencies: platform_tools_version" && false
module libadbd_core missing dependencies: platform_tools_version
[  0% 216/93773] //system/core/adb:libadbd_core static link libadbd_core.a [com.android.adbd]
FAILED: out/soong/.intermediates/system/core/adb/libadbd_core/android_arm64_armv8-a_static_com.android.adbd/libadbd_core.a
echo "module libadbd_core missing dependencies: platform_tools_version" && false
module libadbd_core missing dependencies: platform_tools_version
[  0% 217/93773] build qssi_violators
QSSI: not enabled for qssi target as /release/QSSI/QSSI_enforced_targets_list.txt was not found.
18:19:20 ninja failed with: exit status 1

#### failed to build some targets (02:59 (mm:ss)) ####


real	2m58,272s
user	5m46,325s
sys	1m0,103s
============================================
[build.sh]: FAILED: make  ENABLE_AB=true SYSTEMEXT_SEPARATE_PARTITION_ENABLE=true BOARD_DYNAMIC_PARTITION_ENABLE=true ENABLE_VIRTUAL_AB=false SHIPPING_API_LEVEL=29
============================================

Can you give me some ideas how to build the firmware from two repos? :slight_smile:

Moved your post here maybe read above else maybe @karsten or @MaartenD can help with a tipp

1 Like

From the first post in this topic:

And the most recent update on this:

4 Likes

Hi. I think that I can see a Device Tree Source.
It appears to be fp5-kernel/kernel/msm-5.4/arch/arm64/boot/dts/vendor/fp5
However the Makefile refers to a code names of devices (rather that fairphone5), which I know is normal.
Which of these codenames is the fairphone5 and is the DTS actually there as I suspect it is?
thanks

Hi,

The devicetree used for kernel should be fp5/yupik-iot-idp-pm7250b-overlay.dts - kernel/msm-extra/devicetree - Gitiles overlayed on top of fp5/yupik.dts - kernel/msm-extra/devicetree - Gitiles (keyword “dtbo”, see for example AOSP documentation)

2 Likes

Soooooo about that. How’s it going?

1 Like

Hi!

Since Android 14 for Fairphone 5 has been released, we are now happy to announce the release of the corresponding source code, like we did for Android 13.

The instructions are now updated for Android 14 on code.fairphone.com in the Fairphone 5 section.

Thank you.

19 Likes

We’re are also still working on publishing a source tree that you can build complete images from. There’s progress, but no timeline yet.

10 Likes

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

Hi,

We’re happy to announce that as of today the ODM Android Source Code for Fairphone 5 Android 15 is also now available on code.fairphone.com! The buildable sources (“public-build”) will follow at a later stage since we wanted to get the code out as fast as possible.

Since we didn’t link it here yet, the buildable sources are available for Fairphone 5 Android 13 and Android 14, for more details see: Fairphone 5 Android 13 and 14 source code build

Thanks!

18 Likes