From 17aa9a00357033b4c2f33a3603e095b6b37afa83 Mon Sep 17 00:00:00 2001 From: backslashxx <118538522+backslashxx@users.noreply.github.com> Date: Thu, 13 Feb 2025 14:20:44 +0800 Subject: [PATCH] scripts: disable LeafOS gmscompat if found This also properly cleans it up at uninstall. Some LineageOS based roms use this pif implementation. --- module/post-fs-data.sh | 8 ++++++++ module/uninstall.sh | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 module/uninstall.sh diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index eb84c4c..7eaa466 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -53,3 +53,11 @@ if [ -n "$(resetprop persist.sys.pixelprops.pi)" ]; then resetprop -n -p persist.sys.pixelprops.gapps false resetprop -n -p persist.sys.pixelprops.gms false fi + +# LeafOS "gmscompat: Dynamically spoof props for GMS" +# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4416 +# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4417/5 +if [ -f /data/system/gms_certified_props.json ] && [ ! "$(resetprop persist.sys.spoof.gms)" = "false" ]; then + resetprop persist.sys.spoof.gms false +fi + diff --git a/module/uninstall.sh b/module/uninstall.sh new file mode 100644 index 0000000..d248079 --- /dev/null +++ b/module/uninstall.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# LeafOS "gmscompat: Dynamically spoof props for GMS" +# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4416 +# https://review.leafos.org/c/LeafOS-Project/android_frameworks_base/+/4417/5 +if [ -f /data/system/gms_certified_props.json ]; then + resetprop -p --delete persist.sys.spoof.gms +fi + +# EOF