From 3610af71be2d38a6056ad13a0959eb727b8b8b8c Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Tue, 1 Sep 2020 21:35:15 +0200 Subject: [PATCH] CommonInstaller: add android.permission.ACCESS_BACKGROUND_LOCATION to default-permission on SDK 29+ --- CommonInstaller | 8 +++++++- .../system/etc/default-permissions/microg-permissions.xml | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CommonInstaller b/CommonInstaller index 6aab6e2..6d0a940 100644 --- a/CommonInstaller +++ b/CommonInstaller @@ -1120,9 +1120,15 @@ install_microg () { create_privapp_permissions_whitelist GmsCore nanodroid_install_file etc/permissions/features.xml - nanodroid_install_file etc/default-permissions/microg-permissions.xml nanodroid_install_file etc/sysconfig/microg-a5k.xml + # android.permission.ACCESS_BACKGROUND_LOCATION only on SDK 29+ + if [ "${SDK_VERSION}" -lt 29 ]; then + sed -e '/android.permission.ACCESS_BACKGROUND_LOCATION/d' \ + -i "${INSTALLER}/system/etc/default-permissions/microg-permissions.xml" + fi + nanodroid_install_file etc/default-permissions/microg-permissions.xml + else print_info " << without microG" fi } diff --git a/Full/system/etc/default-permissions/microg-permissions.xml b/Full/system/etc/default-permissions/microg-permissions.xml index 0e1b9fa..8216936 100644 --- a/Full/system/etc/default-permissions/microg-permissions.xml +++ b/Full/system/etc/default-permissions/microg-permissions.xml @@ -39,6 +39,7 @@ +