From 4e53e1c6db372319e646979a03b4d7f44ba85519 Mon Sep 17 00:00:00 2001 From: Jonathan Klee Date: Wed, 6 Jul 2022 08:13:26 +0200 Subject: [PATCH 1/2] Ship ih8sn for more devices We want SafetyNet to work on more devices. If a stable or dev device does not have a specific ih8sn config, we now ship a default ih8sn config. --- config/common.mk | 9 +++++++-- config/ih8sn/ih8sn_default.conf | 4 ++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 config/ih8sn/ih8sn_default.conf diff --git a/config/common.mk b/config/common.mk index 0a6e09a..fc072be 100644 --- a/config/common.mk +++ b/config/common.mk @@ -41,17 +41,22 @@ PRODUCT_COPY_FILES += \ $(VENDOR_PATH)/config/permissions/eos-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/eos-allowlist.xml # SafetyNet compatibility -ifeq (stable,$(RELEASE_TYPE)) +ifneq (test,$(RELEASE_TYPE)) + # Ship ih8sn on dev & stable builds INCLUDE_IH8SN ?= true endif INCLUDE_IH8SN ?= false PRODUCT_CONFIGURATION_FILE := vendor/eos/config/ih8sn/ih8sn_$(subst lineage_,,$(TARGET_PRODUCT)).conf +DEFAULT_CONFIGURATION_FILE := vendor/eos/config/ih8sn/ih8sn_default.conf ifeq (true,$(INCLUDE_IH8SN)) + PRODUCT_PACKAGES += ih8sn ifneq (,$(wildcard $(PRODUCT_CONFIGURATION_FILE))) - PRODUCT_PACKAGES += ih8sn PRODUCT_COPY_FILES += \ $(PRODUCT_CONFIGURATION_FILE):$(TARGET_COPY_OUT_SYSTEM)/etc/ih8sn.conf + else + PRODUCT_COPY_FILES += \ + $(DEFAULT_CONFIGURATION_FILE):$(TARGET_COPY_OUT_SYSTEM)/etc/ih8sn.conf endif endif diff --git a/config/ih8sn/ih8sn_default.conf b/config/ih8sn/ih8sn_default.conf new file mode 100644 index 0000000..cc8f1aa --- /dev/null +++ b/config/ih8sn/ih8sn_default.conf @@ -0,0 +1,4 @@ +BUILD_FINGERPRINT=Xiaomi/dipper/dipper:8.1.0/OPM1.171019.011/V9.5.5.0.OEAMIFA:user/release-keys +DEBUGGABLE=0 +BUILD_TAGS=release-keys +BUILD_TYPE=user -- GitLab From 7580bb86c37a93e7bb4e32fc4cd0dd2d39ae6c6a Mon Sep 17 00:00:00 2001 From: TheScarastic Date: Wed, 21 Jun 2023 15:25:49 +0000 Subject: [PATCH 2/2] vendor: Ship ih8sn only for dev and stable --- config/common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/common.mk b/config/common.mk index fc072be..cf21f4c 100644 --- a/config/common.mk +++ b/config/common.mk @@ -41,7 +41,7 @@ PRODUCT_COPY_FILES += \ $(VENDOR_PATH)/config/permissions/eos-allowlist.xml:$(TARGET_COPY_OUT_SYSTEM)/etc/sysconfig/eos-allowlist.xml # SafetyNet compatibility -ifneq (test,$(RELEASE_TYPE)) +ifneq ($(filter stable dev,$(RELEASE_TYPE)),) # Ship ih8sn on dev & stable builds INCLUDE_IH8SN ?= true endif -- GitLab