From a66bbc9318617236ad2e6be40f775f18827e13c7 Mon Sep 17 00:00:00 2001 From: Lanchon Date: Tue, 1 Aug 2023 22:21:09 -0300 Subject: [PATCH] Add 'WITH_MICROG' setting Introduce 'WITH_MICROG' to replace use of 'WITH_GMS'. Fixes #358. --- Dockerfile | 3 +++ src/build.sh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 93b5a9f9..1f188164 100644 --- a/Dockerfile +++ b/Dockerfile @@ -93,6 +93,9 @@ ENV ZIP_SUBDIR true # Write the verbose logs to $LOGS_DIR/$codename instead of $LOGS_DIR/ ENV LOGS_SUBDIR true +# Include microG's components in the ROM +ENV WITH_MICROG false + # Apply the MicroG's signature spoofing patch # Valid values are "no", "yes" (for the original MicroG's patch) and # "restricted" (to grant the permission only to the system privileged apps). diff --git a/src/build.sh b/src/build.sh index 604d64a1..0e58a39e 100755 --- a/src/build.sh +++ b/src/build.sh @@ -207,6 +207,10 @@ for branch in ${BRANCH_NAME//,/ }; do los_ver_minor=$(sed -n -e 's/^\s*PRODUCT_VERSION_MINOR = //p' "$makefile_containing_version") los_ver="$los_ver_major.$los_ver_minor" + # If needed, include microG's components + #sed -i 's/$(WITH_GMS)/$(WITH_GMS)$(WITH_MICROG)/g' "vendor/$vendor/config/partner_gms.mk" + sed -i 's/ifeq ($(WITH_GMS),true)/ifneq ($(filter true,$(WITH_GMS) $(WITH_MICROG)),)/g' "vendor/$vendor/config/partner_gms.mk" + # If needed, apply the microG's signature spoofing patch if [ "$SIGNATURE_SPOOFING" = "yes" ] || [ "$SIGNATURE_SPOOFING" = "restricted" ]; then # Determine which patch should be applied to the current Android source tree