Fairphone 4 - ODM Android Source Code

For Fairphone 4 we are publishing two separate source trees:

  • “odm” (Android 12 and 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.

Note

For downloading a reduced but buildable source tree, please refer to Fairphone 4 - Build Instructions.

For building only the kernel, please refer to Fairphone 4 - Kernel Source Code.

Browse and view the source code

You can browse and view the sources without downloading them to your computer using the Gerrit web interface. After selecting Browse > Repositories in the top bar and selecting a code repository, select “Repository Browser > browse” to browse its code base. The Fairphone 4 source code can be found in the odm/rc/qssi/13/fp4 and odm/rc/target/13/fp4 branches (replace 13 with 12 for the Android 12 version).

Download the source code

Warning

Please note that you need at least 500 GB of free disk space.

Installing repo

As the source code consists of many subprojects, we will use the repo tool to download the source code. It is very handy to install repo in a user local bin directory.

To install repo, follow the instructions on the AOSP website.

Initializing the repo

Fairphone 4 makes use of Qualcomm’s single system image (QSSI), thus two source trees are needed.

The following commands initialize the repo manifest for the QSSI tree. Replace 13 with 12 if you want to download Android 12 instead.

mkdir fp4-qssi && cd fp4-qssi
repo init -u ssh://gerrit-public.fairphone.software:29418/manifest -b refs/heads/odm/public/13/fp4 -m qssi.xml
# or for http based access
# repo init -u https://gerrit-public.fairphone.software/manifest -b refs/heads/odm/public/13/fp4 -m qssi.xml

The following commands initialize the repo manifest for the target tree:

mkdir fp4-target && cd fp4-target
repo init -u ssh://gerrit-public.fairphone.software:29418/manifest -b refs/heads/odm/public/13/fp4 -m target.xml
# or for http based access
# repo init -u https://gerrit-public.fairphone.software/manifest -b refs/heads/odm/public/13/fp4 -m target.xml

Downloading the source tree

From within either of the previous checkouts, download the source by issuing the following command:

repo sync --detach --current-branch --no-tags

The first time you’ll do that it will take quite some time.