2023-11-29 06:19:14 +02:00
|
|
|
# Remove Play Services from Magisk Denylist when set to enforcing
|
2023-11-24 21:58:30 +02:00
|
|
|
if magisk --denylist status; then
|
|
|
|
magisk --denylist rm com.google.android.gms
|
|
|
|
fi
|
|
|
|
|
2023-11-29 18:49:52 +02:00
|
|
|
# Conditional early sensitive properties
|
|
|
|
|
|
|
|
resetprop_if_diff() {
|
|
|
|
local NAME=$1
|
|
|
|
local EXPECTED=$2
|
|
|
|
local CURRENT=$(resetprop $NAME)
|
2024-01-12 14:32:32 +02:00
|
|
|
|
2024-02-03 16:24:43 +02:00
|
|
|
[ -z "$CURRENT" ] || [ "$CURRENT" == "$EXPECTED" ] || resetprop $NAME $EXPECTED
|
2023-11-29 18:49:52 +02:00
|
|
|
}
|
2023-11-30 19:28:01 +02:00
|
|
|
|
2023-11-29 18:49:52 +02:00
|
|
|
resetprop_if_match() {
|
|
|
|
local NAME=$1
|
|
|
|
local CONTAINS=$2
|
|
|
|
local VALUE=$3
|
2024-01-12 14:32:32 +02:00
|
|
|
|
2024-02-03 16:24:43 +02:00
|
|
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
2023-11-29 18:49:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
# RootBeer, Microsoft
|
|
|
|
resetprop_if_diff ro.build.tags release-keys
|
|
|
|
|
|
|
|
# Samsung
|
|
|
|
resetprop_if_diff ro.boot.warranty_bit 0
|
|
|
|
resetprop_if_diff ro.vendor.boot.warranty_bit 0
|
|
|
|
resetprop_if_diff ro.vendor.warranty_bit 0
|
|
|
|
resetprop_if_diff ro.warranty_bit 0
|
|
|
|
|
2024-02-03 16:24:43 +02:00
|
|
|
# Xiaomi
|
|
|
|
resetprop_if_diff ro.secureboot.lockstate locked
|
|
|
|
|
|
|
|
# Realme
|
|
|
|
resetprop_if_diff ro.boot.realmebootstate green
|
|
|
|
|
2023-11-29 18:49:52 +02:00
|
|
|
# OnePlus
|
|
|
|
resetprop_if_diff ro.is_ever_orange 0
|
|
|
|
|
|
|
|
# Other
|
|
|
|
resetprop_if_diff ro.build.type user
|
|
|
|
resetprop_if_diff ro.debuggable 0
|
|
|
|
resetprop_if_diff ro.secure 1
|