Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb179acc authored by Nicola Corna's avatar Nicola Corna
Browse files

Override device-specific location providers settings

Some devices (currently addison, nx512j and oneplus3) set
config_enableNetworkLocationOverlay=false, binding permanently
com.qualcomm.location as location provider and forbidding us to use
com.google.gms as a location provider.
parent 43e95e17
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ for branch in $BRANCH_NAME; do
      if [ -d "$path" ]; then
        cd "$path"
        git reset -q --hard
        git clean -q -fd
        cd "$SRC_DIR/$branch_dir"
      fi
    done
@@ -178,6 +179,11 @@ for branch in $BRANCH_NAME; do
        fi
        git clean -q -f
        cd ../..

        # Override device-specific settings for the location providers
        sed -i "1s;^;PRODUCT_PACKAGE_OVERLAYS := vendor/$vendor/overlay/microg\n;" "vendor/$vendor/config/common.mk"
        mkdir -p "vendor/$vendor/overlay/microg/frameworks/base/core/res/res/values/"
        cp /root/signature_spoofing_patches/frameworks_base_config.xml "vendor/$vendor/overlay/microg/frameworks/base/core/res/res/values/config.xml"
      else
        echo ">> [$(date)] ERROR: can't find a suitable signature spoofing patch for the current Android version ($android_version)"
        exit 1
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--Copyright (c) 2012-2016, The Linux Foundation. All rights reserved

    Not a Contribution.

    Licensed under the Apache License, Version 2.0 (the "License"); you
    may not use this file except in compliance with the License.  You may
    obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
    implied.  See the License for the specific language governing
    permissions and limitations under the License.
-->

<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">

    <!-- Force-enable the location overlays -->
    <bool name="config_enableNetworkLocationOverlay" translatable="false">true</bool>
    <bool name="config_enableFusedLocationOverlay" translatable="false">true</bool>

</resources>