Add new persistprop common function

This commit is contained in:
osm0sis
2025-06-07 08:57:58 -03:00
parent b4eae8a6b6
commit 77f91e3a85
2 changed files with 16 additions and 8 deletions

View File

@@ -8,6 +8,14 @@ delprop_if_exist() {
[ -n "$(resetprop "$NAME")" ] && resetprop --delete "$NAME"
}
# persistprop <prop name> <value>
persistprop() {
local NAME="$1"
local VALUE="$2"
resetprop -n -p "$NAME" "$VALUE"
}
RESETPROP="resetprop -n"
[ -f /data/adb/magisk/util_functions.sh ] && [ "$(grep MAGISK_VER_CODE /data/adb/magisk/util_functions.sh | cut -d= -f2)" -lt 27003 ] && RESETPROP=resetprop_hexpatch