From 8ca9be2e87761cafd02af028f42020f849d2faa6 Mon Sep 17 00:00:00 2001 From: Rohit Sekhar Date: Wed, 25 Jun 2025 11:17:19 +0530 Subject: [PATCH] FP6: Add support for IMG packages Only touch the partitions that are updated via OTA Skip modemst1 & modemst2 erase Erase userdata & metadata instead of flashing a prebuilt image Hence, we differ to the stock fastboot flash script with the following lines: ``` echo "Partition table..." fastboot flash partition:0 gpt_both0.bin fastboot flash partition:1 gpt_both1.bin fastboot flash partition:2 gpt_both2.bin fastboot flash partition:3 gpt_both3.bin fastboot flash partition:4 gpt_both4.bin fastboot flash partition:5 gpt_both5.bin echo "Flash nCPU..." fastboot flash storsec storsec.mbn echo "Flash Apps..." fastboot flash userdata userdata.img fastboot flash metadata metadata.img fastboot flash study study.tar echo "6350 new images" fastboot flash apdp apdp.mbn fastboot flash logfs logfs_ufs_8mb.bin echo "7635 new images" fastboot flash toolsfv tools.fv fastboot flash vm-persist vm-persist.img echo "6490 new images" fastboot erase modemst1 fastboot erase modemst2 ``` --- flash/FP6/config.mk | 9 +++++++++ flash/FP6/flash_FP6_factory.sh | 20 ++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 flash/FP6/config.mk create mode 100755 flash/FP6/flash_FP6_factory.sh diff --git a/flash/FP6/config.mk b/flash/FP6/config.mk new file mode 100644 index 0000000..dd15dbc --- /dev/null +++ b/flash/FP6/config.mk @@ -0,0 +1,9 @@ +HLOS_IMAGES_TARGET := boot.img \ + dtbo.img \ + init_boot.img \ + pvmfw.img \ + recovery.img \ + super.img \ + vbmeta.img \ + vbmeta_system.img \ + vendor_boot.img diff --git a/flash/FP6/flash_FP6_factory.sh b/flash/FP6/flash_FP6_factory.sh new file mode 100755 index 0000000..1150f16 --- /dev/null +++ b/flash/FP6/flash_FP6_factory.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Target device info +PRODUCT="Fairphone 6" +PRODUCT_ID="FP6" + +# Target Flashing Images info +FLASH_AB_FW_IMGS="bluetooth devcfg dsp modem xbl tz hyp keymaster abl aop featenabler imagefv multiimgoem qupfw uefisecapp xbl_config aop_config cpucp_dtb uefi vm-bootsys xbl_ramdump cpucp shrm studybk" +FLASH_AB_IMGS="boot dtbo vbmeta_system vbmeta init_boot pvmfw recovery vendor_boot" +FLASH_A_IMGS="super" +ERASE_IMGS="misc userdata metadata" + +# Target flash process behavior +CLEAN_FLASH=true +VIRTUAL_AB=true + +source factory.common + +# Common flashing function +flash_factory -- GitLab