Fairphone 5 - Android Source Code

Here you can find instructions on how to browse, view and download the source code for Fairphone 5.

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.

Note

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

Gerrit

In order to get access to the sources, you have to register an account on our Gerrit. Gerrit is a web-based tool that we use for hosting source code, among other things. Click on the register link using OpenID and upload an SSH key into your Gerrit account.

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 5 source code can be found in the odm/rc/qssi/13/fp5 and odm/rc/target/13/fp5 branches.

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 5 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:

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

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

mkdir fp5-target && cd fp5-target
repo init -u ssh://gerrit-public.fairphone.software:29418/manifest -b refs/heads/odm/public/13/fp5 -m target.xml
# or for http based access
# repo init -u https://gerrit-public.fairphone.software/manifest -b refs/heads/odm/public/13/fp5 -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.