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_MICROG setting #460

Closed
wants to merge 4 commits 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
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,12 @@ the list of devices for each specific branch (see [the examples](#examples)).

### GMS / microG

To include microG (or possibly the actual Google Mobile Services) in your build,
LineageOS expects certain Makefiles in `vendor/partner_gms` and variable
`WITH_GMS` set to `true`.
To include microG's components in your build, you must provide the components
in `vendor/partner_gms` and set variable `WITH_MICROG` to `true`.

[This][android_vendor_partner_gms] repo contains the common packages included for
official lineageos4microg builds. To include it in your build, create an XML
(the name is irrelevant, as long as it ends with `.xml`) in the
official lineageos4microg builds. To include it in your build, create a `microg.xml`
file (the name is irrelevant as long as it ends with `.xml`) in the
`/home/user/manifests` folder with this content:

```xml
Expand All @@ -70,6 +69,9 @@ official lineageos4microg builds. To include it in your build, create an XML
</manifest>
```

To include the actual Google Mobile Services in your build instead, provide
those components in `vendor/partner_gms` and set variable `WITH_GMS` to `true`.

### Additional custom apps

If you wish to add other apps to your ROM, you can include a repository with
Expand Down Expand Up @@ -231,7 +233,7 @@ docker run \
-e "DEVICE_LIST=bacon" \
-e "SIGN_BUILDS=true" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "WITH_GMS=true" \
-e "WITH_MICROG=true" \
-v "/home/user/lineage:/srv/src" \
-v "/home/user/zips:/srv/zips" \
-v "/home/user/logs:/srv/logs" \
Expand All @@ -258,7 +260,7 @@ docker run \
-e "DEVICE_LIST_LINEAGE_18_1=river,lake" \
-e "SIGN_BUILDS=true" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "WITH_GMS=true" \
-e "WITH_MICROG=true" \
-e "OTA_URL=https://api.myserver.com/" \
-v "/home/user/lineage:/srv/src" \
-v "/home/user/zips:/srv/zips" \
Expand Down Expand Up @@ -319,7 +321,7 @@ docker run \
-e "DEVICE_LIST=a6000" \
-e "SIGN_BUILDS=true" \
-e "SIGNATURE_SPOOFING=restricted" \
-e "WITH_GMS=true" \
-e "WITH_MICROG=true" \
-e "INCLUDE_PROPRIETARY=false" \
-v "/home/user/lineage:/srv/src" \
-v "/home/user/zips:/srv/zips" \
Expand Down
5 changes: 5 additions & 0 deletions src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ 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
if [ "$WITH_MICROG" = true ]; then
echo '$(call inherit-product, vendor/partner_gms/products/gms.mk)' > "vendor/$vendor/config/partner_gms.mk"
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