Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WITH_GMS_ALT setting as an alternative to WITH_GMS #493

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ 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_GMS false

# Include microG's components in the ROM providing free space for add-ons in system
#
# On newer devices running Android 10+ and using dynamic partitions, the size of
# the system partition is defined by the ROM being flashed. For these devices,
# regular LineageOS builds reserve some free space in the system partition
# for add-ons such as GApps (typically 600MB). However, using WITH_GMS to include
# microG's components in the ROM has the side effect of disabling this space
# reservation, making later installation of add-ons impossible. Use WITH_GMS_ALT
# as an alternative to WITH_GMS that does not disable space reservation in system.
ENV WITH_GMS_ALT 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).
Expand Down
10 changes: 10 additions & 0 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,16 @@ 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 while providing free space for add-ons in system
if [ "$WITH_GMS_ALT" = true ]; then
if [ "$WITH_GMS" = true ]; then
echo ">> [$(date)] ERROR: WITH_GMS and WITH_GMS_ALT cannot be both true"
exit 1
else
echo '$(call inherit-product, vendor/partner_gms/products/gms.mk)' > "vendor/$vendor/config/partner_gms.mk"
fi
fi

# 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
Expand Down