Jump to content

Fairphone 5 (fairphone-fp5)

From postmarketOS Wiki
Fairphone 5
File:Fairphone5-mainline.jpg
Manufacturer Fairphone
Name 5
Codename fairphone-fp5
Model FP5
Released 2023
Type handset
Hardware
Chipset Qualcomm QCM6490
CPU Octa-core (1x2.7GHz Cortex-A78
3x2.4GHz Cortex-A78
4x1.9GHz Cortex-A55)
GPU Adreno 643
Display 1224x2700
Storage 256GB
Memory 8GB
Architecture aarch64
Software
Original software
The software and version the device was shipped with.
Android 13
Extended version
The most recent supported version from the manufacturer.
Android
postmarketOS
Category testing
Pre-built images
Whether pre-built images are available from the postmarketOS Installation page.
yes
Mainline
Instead of a Linux kernel fork, it is possible to run (Close to) Mainline.
yes
pmOS kernel
The kernel version that runs on the device's port.
6.17.0
Unixbench score
Unixbench Whetstone/Dhrystone score. See Unixbench.
10425.8
Device package device-fairphone-fp5
Kernel package linux-postmarketos-qcom-sc7280
Features
Flashing
Whether it is possible to flash the device with pmbootstrap flasher.
Works
USB Networking
After connecting the device with USB to your PC, you can connect to it via telnet (initramfs) or SSH (booted system).
Works
Internal storage
eMMC, SD cards, UFS...
Works
SD card
Also includes other external storage cards.
Works
Battery
Whether charging and battery level reporting work.
Works
Screen
Whether the display works; ideally with sleep mode and brightness control.
Works
Touchscreen
Works
Multimedia
3D Acceleration
Works
Audio
Audio playback, microphone, headset and buttons.
Partial
Camera
Partial
Camera Flash
Works
Connectivity
WiFi
Works
Bluetooth
Works
GPS
Works
NFC
Near Field Communication
Broken
Modem
Calls
Partial
SMS
Works
Mobile data
Works
Miscellaneous
FDE
Full disk encryption and unlocking with unl0kr.
Works
USB OTG
USB On-The-Go or USB-C Role switching.
Works
HDMI/DP
Video and audio output with HDMI or DisplayPort.
Works
Fingerprint
Fingerprint reader.
Broken
Sensors
Accelerometer
Handles automatic screen rotation in many interfaces.
Works
Magnetometer
Sensor to measure the Earth's magnetism
Works
Ambient Light
Measures the light level; used for automatic screen dimming in many interfaces.
Works
Proximity
Works
Hall Effect
Measures magnetic fields; usually used as a flip cover sensor
Works
Haptics
Works

Description

The Fairphone 5 is a sustainable smartphone with a modular design that emphasizes repairability, featuring ten swappable spare parts and a removable back panel made of recycled plastic.

  • Built to last for years to come
  • Fast, powerful, reliable - supported until 2031
  • Made with fair and recycled materials

Boot modes

By holding various button combinations while booting, the device can be made to boot into different modes. Unplug from USB, power off the device and press and hold the below buttons to enter the specific boot mode.

Boot mode PWR Vol+ Vol-
Fastboot Y N Y
Recovery Y Y N
Download N N N

Installation

Note You should upgrade your phone to the latest official firmware before start tinkering with it. Development is mostly done on the latest firmware.

Unlock the bootloader according to the official instructions.

Manual install

  • Enter fastboot according to boot modes instructions above.
  • You can choose to install postmarketOS on slot B: fastboot set_active b reboot bootloader
  • Firstly, flash the boot partition: fastboot flash boot *boot.img
  • Secondly, you have a few choices to flash the postmarketOS rootfs:
    • userdata partition (212GiB usable space): fastboot flash userdata *rootfs.img
    • super partition (5.63GiB usable space): fastboot flash super *rootfs.img
    • SD memory card: dd if=*rootfs.img of=/dev/$blk_dev bs=8M status=progress
  • Finally, erase the dtbo partition and reboot the device: fastboot erase dtbo reboot

pmbootstrap install

Images can be flashed by simply running the following commands while the device is in fastboot mode:

  • pmbootstrap flasher flash_rootfs
  • pmbootstrap flasher flash_kernel

UBports Installer

Note UBports Installer is not currently packaged on postmarketOS. These instructions are only reasonable if you have a host running a distribution which provides packages for it.

You can use UBports Installer v0.9.8 (or later) to flash a prebuilt image of postmarketOS onto your Fairphone 5. Just select postmarketOS in the OS selection and choose the desired UI and lean back!

Web flasher

You can use the postmarketOS web flasher to flash a prebuilt image of postmarketOS onto your Fairphone 5. Follow the instructions on the page.

Note Web installer only works on Chromium based browsers. Web installer does not work with Firefox or Firefox based browsers like Librewolf and Mullvad. If "Give access" fails, try running as root. If the page crashes during installation, try freeing some RAM.

Dual boot

dual boot is totally feasible, before installing postmarketOS switching to the inactive slot is advised:

$ pmbootstrap init
[...]
$ pmbootstrap install --fde --sdcard=...
[...]
$ pmbootstrap export --no-install
[...]
$ fastboot getvar current-slot
< waiting for any device >
current-slot: b
Finished. Total time: 0.002s
$ fastboot --set-active=a         #if it said a above say b here
Setting current slot to 'a'                        OKAY [  0.042s]
Finished. Total time: 0.044s
$ fastboot getvar current-slot    #verifying
current-slot: a
Finished. Total time: 0.002s
$ fastboot erase dtbo
Erasing 'dtbo'                                     OKAY [  0.002s]
Finished. Total time: 0.006s
$ fastboot flash boot /tmp/postmarketOS-export/boot.img
Sending 'boot_a' (21412 KB)                        OKAY [  0.766s]
Writing 'boot_a'                                   OKAY [  0.040s]
Finished. Total time: 0.836s
$ fastboot reboot
Rebooting                                          OKAY [  0.001s]
Finished. Total time: 0.252s

you can install twrp or BootControl to switch between slots on Android.

Warning WARNING: qbootctl DOES NOT WORK on postmarketOS and WILL BRICK your device upon trying to switch slots, requiring a boot to EDL (which can ONLY be done by the Fairphone repair center): https://github.com/linux-msm/qbootctl/issues/4

Return to Android

Follow the instructions on the respective official page of Fairphone-OS or Murena-/e/OS to return to stock Android.

Partition layout

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sda

Disk /dev/sda: 232.26 GiB, 249384927232 bytes, 60884992 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 0821EE0A-71A8-3C12-DB9A-CE6A85674BF8

Device       Start      End  Sectors  Size Name
/dev/sda1        6      261      256    1M traceability
/dev/sda2      262      293       32  128K fpconfig_persist
/dev/sda3      294      325       32  128K fpconfig
/dev/sda4      326     1349     1024    4M oembin
/dev/sda5     1350     1351        2    8K ssd
/dev/sda6     1352     9543     8192   32M persist
/dev/sda7     9544     9799      256    1M misc
/dev/sda8     9800     9927      128  512K keystore
/dev/sda9     9928    10055      128  512K frp
/dev/sda10   10056    11591     1536    6M study
/dev/sda11   11592    11623       32  128K swversion
/dev/sda12   11624  1584487  1572864    6G super
/dev/sda13 1584488  1584503       16   64K vbmeta_system_a
/dev/sda14 1584504  1584519       16   64K vbmeta_system_b
/dev/sda15 1584520  1588615     4096   16M metadata
/dev/sda16 1588616  4785543  3196928 12.2G rawdump
/dev/sda17 4785544 60884986 56099443  214G userdata

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sdb

Disk /dev/sdb: 8 MiB, 8388608 bytes, 2048 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 1337EC69-5D9F-B82A-FAF4-712E5DAC1E17

Device     Start   End Sectors  Size Name
/dev/sdb1      6   906     901  3.5M xbl_a
/dev/sdb2    907   964      58  232K xbl_config_a
/dev/sdb3    965  2042    1078  4.2M last_parti

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sdc

Disk /dev/sdc: 8 MiB, 8388608 bytes, 2048 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 5110ED0C-0518-D18E-C5B0-B3AF5C114F1B

Device     Start   End Sectors  Size Name
/dev/sdc1      6   906     901  3.5M xbl_b
/dev/sdc2    907   964      58  232K xbl_config_b
/dev/sdc3    965  2042    1078  4.2M last_parti

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sdd

Disk /dev/sdd: 32 MiB, 33554432 bytes, 8192 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 09405E76-7ABA-8F0C-8C5C-2A1F0AAA40A4

Device     Start   End Sectors  Size Name
/dev/sdd1      6    31      26  104K ALIGN_TO_128K_1
/dev/sdd2     32    63      32  128K cdt
/dev/sdd3     64   319     256    1M ddr
/dev/sdd4    320  8186    7867 30.7M last_parti

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sde

Disk /dev/sde: 6 GiB, 6442450944 bytes, 1572864 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: A967AD1A-77E5-28F5-B8BF-082C0AA32875

Device      Start     End Sectors  Size Name
/dev/sde1       6     133     128  512K aop_a
/dev/sde2     134    1157    1024    4M tz_a
/dev/sde3    1158    3205    2048    8M hyp_a
/dev/sde4    3206   59525   56320  220M modem_a
/dev/sde5   59526   60549    1024    4M bluetooth_a
/dev/sde6   60550   61573    1024    4M mdtpsecapp_a
/dev/sde7   61574   69765    8192   32M mdtp_a
/dev/sde8   69766   70021     256    1M abl_a
/dev/sde9   70022   86405   16384   64M dsp_a
/dev/sde10  86406   86533     128  512K keymaster_a
/dev/sde11  86534  111109   24576   96M boot_a
/dev/sde12 111110  111141      32  128K devcfg_a
/dev/sde13 111142  111161      20   80K qupfw_a
/dev/sde14 111162  111177      16   64K vbmeta_a
/dev/sde15 111178  117321    6144   24M dtbo_a
/dev/sde16 117322  117833     512    2M uefisecapp_a
/dev/sde17 117834  118345     512    2M imagefv_a
/dev/sde18 118346  118377      32  128K shrm_a
/dev/sde19 118378  118385       8   32K multiimgoem_a
/dev/sde20 118386  118641     256    1M cpucp_a
/dev/sde21 118642  118673      32  128K featenabler_a
/dev/sde22 118674  143249   24576   96M vendor_boot_a
/dev/sde23 143250  150929    7680   30M qmcs
/dev/sde24 150930  150993      64  256K qweslicstore_a
/dev/sde25 150994  152529    1536    6M studybk_a
/dev/sde26 152530  152657     128  512K aop_b
/dev/sde27 152658  153681    1024    4M tz_b
/dev/sde28 153682  155729    2048    8M hyp_b
/dev/sde29 155730  212049   56320  220M modem_b
/dev/sde30 212050  213073    1024    4M bluetooth_b
/dev/sde31 213074  214097    1024    4M mdtpsecapp_b
/dev/sde32 214098  222289    8192   32M mdtp_b
/dev/sde33 222290  222545     256    1M abl_b
/dev/sde34 222546  238929   16384   64M dsp_b
/dev/sde35 238930  239057     128  512K keymaster_b
/dev/sde36 239058  263633   24576   96M boot_b
/dev/sde37 263634  263665      32  128K devcfg_b
/dev/sde38 263666  263685      20   80K qupfw_b
/dev/sde39 263686  263701      16   64K vbmeta_b
/dev/sde40 263702  269845    6144   24M dtbo_b
/dev/sde41 269846  270357     512    2M uefisecapp_b
/dev/sde42 270358  270869     512    2M imagefv_b
/dev/sde43 270870  270901      32  128K shrm_b
/dev/sde44 270902  270909       8   32K multiimgoem_b
/dev/sde45 270910  271165     256    1M cpucp_b
/dev/sde46 271166  271197      32  128K featenabler_b
/dev/sde47 271198  295773   24576   96M vendor_boot_b
/dev/sde48 295774  295837      64  256K qweslicstore_b
/dev/sde49 295838  297373    1536    6M studybk_b
/dev/sde50 297374  297374       1    4K devinfo
/dev/sde51 297375  297630     256    1M dip
/dev/sde52 297631  297694      64  256K apdp
/dev/sde53 297695  306050    8356 32.6M splash
/dev/sde54 306051  306051       1    4K limits
/dev/sde55 306052  306052       1    4K limits-cdsp
/dev/sde56 306053  306308     256    1M toolsfv
/dev/sde57 306309  308356    2048    8M logfs
/dev/sde58 308357  318596   10240   40M quantumsdk
/dev/sde59 318597  449668  131072  512M logdump
/dev/sde60 449669  449700      32  128K storsec
/dev/sde61 449701  449828     128  512K uefivarstore
/dev/sde62 449829  449835       7   28K secdata
/dev/sde63 449836  449963     128  512K catefv
/dev/sde64 449964  450219     256    1M catecontentfv
/dev/sde65 450220  458575    8356 32.6M vm-data
/dev/sde66 458576  463695    5120   20M mdcompress
/dev/sde67 463696  463727      32  128K connsec
/dev/sde68 463728  463759      32  128K tzsc
/dev/sde69 463760  463887     128  512K rtice
/dev/sde70 463888 1572858 1108971  4.2G last_parti

fdisk -lo Device,Start,End,Sectors,Size,Name /dev/sdf

Disk /dev/sdf: 32 MiB, 33554432 bytes, 8192 sectors
Disk model: KM8F9001JM-B813 
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 524288 bytes
Disklabel type: gpt
Disk identifier: 5979A5AC-E514-89B6-D102-7D55F8A32097

Device     Start   End Sectors  Size Name
/dev/sdf1      6    31      26  104K ALIGN_TO_128K_2
/dev/sdf2     32   799     768    3M fsg
/dev/sdf3    800  2335    1536    6M modemst1
/dev/sdf4   2336  3871    1536    6M modemst2
/dev/sdf5   3872  3903      32  128K fsc
/dev/sdf6   3904  8186    4283 16.7M last_parti

Components

Component table

Component Model Notes
Modem QDM5577
eSIM ST33G1M2LCL9EMM9
Power button PMK7325
Volume down PMK7325
Volume up GPIO
Display BF065GBM-TK0-7DP0 RM692E5 driver IC
Touchscreen GT9897
Chipset QCM6490
GPU Adreno 642L
SD card sdhc_2
Internal storage UFS 2.2
Main camera IMX800 C-PHY
Wide camera IMX858 D-PHY
Front camera S5KJN1SQ03 D-PHY
ToF sensor ?
Camera flash PM7350C
Audio codec WCD9385
Earpiece SLS1012A
Speaker SLS1115D-01
Microphones SM0103B-RS421-M02
Vibration motor AW86927FCR
WiFi WCN6750
Bluetooth WCN6750
GNSS/GPS SD735
NFC ST21NFCD
Fingerprint MMW-FLE-97831
Sixaxis LSM6DSOQTR
Light / Proximity STK33562-175
Magnetometer MMC5603NJ
Fuel gauge PM7250B via pmic-glink
Charger PM7250B via pmic-glink

Display

Adjusting the screen brightness can render some graphical artifacts and may rarely broke your display output. You can lock and unlock your phone via power button to restore it to a working state. Issue already reported here.

Audio

See the dedicated page on this topic for a write-up of the current state of development. Help welcome!

On postmarketOS Edge, the earpiece and speaker work with stereo audio output. Only the bottom microphone works to capture audio and the volume is quite low.

Audio routing for calls is currently broken, although there has been a proof of concept demonstrating at least some audio routing functionality.

Audio via HDMI/DisplayPort has been disabled to provide functionality for the integrated speakers.

Audio path:

  • CPU via I2S (quinary) to AW88261FCR: speaker (and echo reference back)
  • CPU via SoundWire to WCD9385: microphones (AMIC1, AMIC3, AMIC4), Type-C audio (WCD_HPH & AMIC2), HAC (WCD_AUX)

Cameras

Only the selfie and ultra wide cameras are currently working. The main camera does not have a driver yet. You need to have all cameras physically installed to use any of them.

Camera Purpose Part number
Front camera Sensor Samsung S5KJN1SQ03
EEPROM Giantec GT24P128F
Main camera Sensor Sony IMX800
EEPROM Puya P24C256C
Actuator Asahi Kasei AK7377
OIS driver Dongwoon DW9784
Wide camera Sensor Sony IMX858
EEPROM Giantec GT24P128F
Actuator Dongwoon DW9800K

The image quality is not quite on-par with Android at the moment.

U-Boot

Fairphone 5 UART pins

U-Boot git U-Boot has a DTS for FP5 at dts/upstream/src/arm64/qcom/qcm6490-fairphone-fp5.dts

UART is required for testing. The picture is of the board with the necessary pins for UART. These were found by using the provided schematic from Fairphone. Transmit (output from phone to computer) is verified working.

Building

  • Get active slot fastboot getvar current-slot
  • Erase DTBO from active slot fastboot erase dtbo_ACTIVESLOT
  • Build u-boot
    • make CROSS_COMPILE="aarch64-linux-gnu-" qcm6490_defconfig qcom-phone.config
    • make menuconfig
      • Device Tree Control
        • Default Device Tree for DT control
          • qcom/qcm6490-fairphone-fp5
    • make -j$(nproc)
  • Gzip u-boot image gzip -k u-boot-nodtb.bin
  • Create android boot image mkbootimg.py --base 0x00000000 --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --second_offset 0x00000000 --tags_offset 0x00000100 --dtb_offset 0x01f00000 --pagesize 4096 --kernel u-boot-nodtb.bin.gz --dtb "dts/upstream/src/arm64/qcom/qcm6490-fairphone-fp5.dtb" --header_version 2 --output boot.img
  • Flash android boot image fastboot flash boot_ACTIVESLOT boot.img

Notes

U-boot does not seem to support the SD/MMC in the FP5 yet although the DTS contains it and there are Qualcomm SDHC drivers.

Default boot menu is at board/qualcomm/qcom-phone.env. Will only show if boot menu is enabled in menuconfig. No OS booting has been tested and u-boot will not automatically recognize and boot Android as it is.

mkbootimg offsets were taken from the deviceinfo file.

UART receive does not work with this configuration, I can only get transmit from the phone. I do not know if it's not supported or not configured correctly. I tried kconfig settings from here as well but it didn't work. Help in this area would be great so we can troubleshoot dual booting with a menu upon bootup.

Example command to connect to USB UART device and open a shell

minicom -w -R UTF-8 -b 115200 -8 -D /dev/ttyUSB0 -C out.log

Contributors

Users owning this device

  • 0d (Notes: Daily driver)
  • Arthurium (Notes: My only modern smartphone currently running single boot postmarketOS Edge with Phosh.)
  • Bastianilso (Notes: 1 stock fairphone OS, 1 lineage os)
  • BEEDELLROKEJULIANLOCKHART (Notes: Daily device)
  • BrambleF (Notes: Daily driver, stock OS)
  • Buchstabenwurst (Notes: Daily driver, Stock OS)
  • Cosmo (Notes: postmarketOS edge / Plasma Mobile)
  • Cotequinho (Notes: Daily driver w/ official Android 15.)
  • Crashniels (Notes: Stock)
  • Deathmist
  • FerassElHafidi (Notes: LineageOS, need reliability so I don't mess around with this device too much.)
  • Imre (Notes: dual booting pmos and stock android)
  • Jarico (Notes: (8G/256G; pmOS edge; Systemd) Best pmOS device so far)
  • Jubby80 (Notes: 6GB/128GB Secondary phone, runs pmOS edge with plasma-mobile)
  • K8ie (Notes: LineageOS, Daily driver)
  • Knuxyl (Notes: PMOS/Gentoo)
  • Linmob (Notes: postmarketOS edge)
  • Manut (Notes: Android ATM)
  • Mariob (Notes: pmOS hobbying and dreaming platform)
  • Mtvec
  • Nspmos (Notes: postmarketOS edge/Phosh)
  • Polyfloyd (Notes: daily driver, stock ROM)
  • PureTryOut (Notes: Daily driver with Android)
  • Techwizz (Notes: Running postmarketOS)
  • Tjikkun
  • Tommi
  • WhyNotHugo (Notes: Ex-daily driver. Currently unused. Murena edition, stock.)
  • Wrenix (Notes: Daily driver with Android (current iodeOS - unhappy))
  • Z3ntu
  • Zokhoi (Notes: 8/256, Android 13)


Resources

See also