scripts: disable LeafOS gmscompat if found

This also properly cleans it up at uninstall.
Some LineageOS based roms use this pif implementation.
This commit is contained in:
backslashxx 2025-02-13 14:20:44 +08:00
parent 79385b6f9d
commit 6c42fa08a9
2 changed files with 19 additions and 0 deletions

View File

@ -55,3 +55,12 @@ 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

10
module/uninstall.sh Normal file
View File

@ -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