From 26a27aae4f1dfa1491175547e48f3eb707c55a45 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Tue, 29 Mar 2022 08:26:24 +0200 Subject: [PATCH] Add ih8sn configurations for SafetyNet compatibility Do not force security patch level with the build system because it causes issues for deployment through OTA. Instead use ih8sn to force security patch level later in the boot. We also add the build fingerprint instead of shipping it with GmsCore. --- config/common.mk | 11 +++++++++++ config/ih8sn/ih8sn_FP3.conf | 3 +++ config/ih8sn/ih8sn_FP4.conf | 3 +++ config/ih8sn/ih8sn_emerald.conf | 3 +++ 4 files changed, 20 insertions(+) create mode 100644 config/ih8sn/ih8sn_FP3.conf create mode 100644 config/ih8sn/ih8sn_FP4.conf create mode 100644 config/ih8sn/ih8sn_emerald.conf diff --git a/config/common.mk b/config/common.mk index c2547cd..27e8558 100644 --- a/config/common.mk +++ b/config/common.mk @@ -22,3 +22,14 @@ DEVICE_PACKAGE_OVERLAYS += \ PRODUCT_COPY_FILES += \ $(VENDOR_PATH)/config/permissions/eos-permissions.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/default-permissions/eos-permissions.xml \ $(VENDOR_PATH)/config/permissions/eos-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/eos-allowlist.xml + +# SafetyNet +PRODUCT_CONFIGURATION_FILE := vendor/eos/config/ih8sn/ih8sn_$(subst lineage_,,$(TARGET_PRODUCT)).conf + +ifneq (eng,$(TARGET_BUILD_VARIANT)) + ifneq (,$(wildcard $(PRODUCT_CONFIGURATION_FILE))) + PRODUCT_PACKAGES += ih8sn + PRODUCT_COPY_FILES += \ + $(PRODUCT_CONFIGURATION_FILE):$(TARGET_COPY_OUT_SYSTEM)/etc/ih8sn.conf + endif +endif diff --git a/config/ih8sn/ih8sn_FP3.conf b/config/ih8sn/ih8sn_FP3.conf new file mode 100644 index 0000000..f4048f2 --- /dev/null +++ b/config/ih8sn/ih8sn_FP3.conf @@ -0,0 +1,3 @@ +BUILD_SECURITY_PATCH_DATE=2022-01-05 +BUILD_FINGERPRINT=Fairphone/FP3/FP3:10/8901.3.A.0135.20211222/gms-3e31ddee:user/release-keys +DEBUGGABLE=0 diff --git a/config/ih8sn/ih8sn_FP4.conf b/config/ih8sn/ih8sn_FP4.conf new file mode 100644 index 0000000..2b240d1 --- /dev/null +++ b/config/ih8sn/ih8sn_FP4.conf @@ -0,0 +1,3 @@ +BUILD_SECURITY_PATCH_DATE=2021-12-05 +BUILD_FINGERPRINT=Fairphone/FP4eea/FP4:11/RKQ1.210503.001/FP3Q:user/release-keys +DEBUGGABLE=0 diff --git a/config/ih8sn/ih8sn_emerald.conf b/config/ih8sn/ih8sn_emerald.conf new file mode 100644 index 0000000..e198e71 --- /dev/null +++ b/config/ih8sn/ih8sn_emerald.conf @@ -0,0 +1,3 @@ +BUILD_SECURITY_PATCH_DATE=2021-10-05 +BUILD_FINGERPRINT=Teracube/Teracube_2e/Teracube_2e:11/RP1A.200720.011/202111011925:user/release-keys +DEBUGGABLE=0 -- GitLab