Fairphone 4 Android 11, 12 and 13 source code release

From the very beginning, Open Source software has been an important topic for Fairphone – it’s part of our history and DNA.

On every smartphone we produce and sell – we publish as much source code as we legally can. And we share all of this information publicly with our users and community on our Fairphone Code website.

Following this ambition we are excited to announce that today, we are happy to release the source code for Android 11, Android 12 and Android 13 for Fairphone 4.

You can find instructions for browsing, viewing and downloading the source code on code.fairphone.com. If you are interested, you can also send patches and contributions to our Gerrit instance at https://gerrit-public.fairphone.software.

We are publishing two different kind of source trees:

  • “odm” (Android 12 and Android 13 only): This is the source tree from our hardware and software supplier T2Mobile. It contains all Android and Linux kernel sources that we can publish, excluding some proprietary components. It is not possible to actually build this from source, since it depends on proprietary toolchains and sources.
  • Integration (“int”): This is a restructured and cleaned up source tree that we use to prepare for long term maintenance. It contains all basic device sources, configuration and customization, but is missing some partner and network-specific customization. You can build this tree from source, after downloading separately packages proprietary blobs.

Feel free to discuss the release, and let us know if you have any questions or feedback!

21 Likes

Firstly, a big thanks for making this and the associated binary blobs available!

I’ve just tried building Android 12 for FP4 and after fixing a weird issue with ccache, which is seemingly specific to Android 12, the build appeared to get most of the way through before failing. I ran the build a 2nd time to confirm and the (shorter) output can be found here:

Any suggestions would be much appreciated!

1 Like

Just to add, perhaps this is the problem?

[ 14% 367/2481] //vendor/st/nfc/packages/apps/Nfc:Nfc_st javac [common]
FAILED: out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/Nfc_st.jar
rm -rf “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/classes” “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_comm
on/javac/anno” “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars” “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/andr
oid_common/javac/Nfc_st.jar” && mkdir -p “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/classes” “out/soong/.intermediates/vendor/st/nfc/pac
kages/apps/Nfc/Nfc_st/android_common/javac/anno” “out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars” && out/soong/host/linux-x86/bin/zip
sync -d out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars -l out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_com
mon/javac/srcjars/list -f “*.java” out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/gen/android/R.srcjar && (if [ -s out/soong/.intermediates/vendor/
st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars/list ] || [ -s out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/Nfc_st.jar.rsp ] ;
then out/soong/host/linux-x86/bin/soong_javac_wrapper prebuilts/jdk/jdk11/linux-x86/bin/javac -J-Xmx2048M -J-XX:OnError=“cat hs_err_pid%p.log” -J-XX:CICompilerCount=6 -J-XX:+UseD
ynamicNumberOfGCThreads -Xmaxerrs 9999999 -encoding UTF-8 -sourcepath “” -g -XDskipDuplicateBridges=true -XDstringConcat=inline -proc:none -Xlint:-dep-ann --system=out/soong/.int
ermediates/libcore/mmodules/core_platform_api/stable-core-platform-api-stubs-system-modules/android_common/system -classpath out/soong/.intermediates/frameworks/base/ext/android_c
ommon/turbine-combined/ext.jar:out/soong/.intermediates/frameworks/base/framework/android_common/turbine-combined/framework.jar:out/soong/.intermediates/vendor/st/nfc/st21nfc/fram
eworks/NfcExtensions/com.st.android.nfc_extensions/android_common/turbine-combined/com.st.android.nfc_extensions.jar:out/soong/.intermediates/prebuilts/sdk/current/androidx/androi
dx.appcompat_appcompat/android_common/turbine-combined/androidx.appcompat_appcompat.jar -source 1.9 -target 1.9 -d out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/
android_common/javac/classes -s out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/anno @out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc
/Nfc_st/android_common/javac/Nfc_st.jar.rsp @out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars/list ; fi ) && out/soong/host/linux-x86/b
in/soong_zip -jar -o out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/Nfc_st.jar -C out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nf
c_st/android_common/javac/classes -D out/soong/.intermediates/vendor/st/nfc/packages/apps/Nfc/Nfc_st/android_common/javac/classes && rm -rf “out/soong/.intermediates/vendor/st/nfc
/packages/apps/Nfc/Nfc_st/android_common/javac/srcjars”
vendor/st/nfc/packages/apps/Nfc/src/com/android/nfc/NfcService.java:2893: error: method does not override or implement a method from a supertype
@Override
^
1 error

Thanks for reporting this @9600

We had missed to merge a CL related to this which caused this compilation issue. It is now fixed as the CL is now merged. For reference, this was the fix.

Please re-sync the code and it should work fine.

Thanks.

5 Likes

Thanks for the prompt fix @bharath. I can confirm that it now builds fine for me. On to flashing next.

3 Likes

Hello all,

As we had shared during the Android 11 and 12 source release, we are now happy to release the source code for Android 13 for Fairphone 4.

The instructions are now updated for Android 13 in code.fairphone.com. If you are interested, you can also send patches and contributions to our Gerrit instance at https://gerrit-public.fairphone.software.

The Android 13 sources too contain two different kind of source trees: odm(which cannot be used to build from source) and int(fully buildable but contains minimal changes).

Thanks you.

10 Likes