You've already forked Zygisk-Assistant
mirror of
https://github.com/snake-4/Zygisk-Assistant.git
synced 2025-09-06 06:37:02 +00:00
Please see https://github.com/osm0sis/PlayIntegrityFork/tree/main/module and https://github.com/Displax/safetynet-fix/tree/dev/magisk for full commit history and attribution/authorship
18 lines
489 B
Bash
18 lines
489 B
Bash
# resetprop_if_diff <prop name> <expected value>
|
|
resetprop_if_diff() {
|
|
local NAME="$1"
|
|
local EXPECTED="$2"
|
|
local CURRENT="$(resetprop "$NAME")"
|
|
|
|
[ -z "$CURRENT" ] || [ "$CURRENT" = "$EXPECTED" ] || resetprop -n "$NAME" "$EXPECTED"
|
|
}
|
|
|
|
# resetprop_if_match <prop name> <value match string> <new value>
|
|
resetprop_if_match() {
|
|
local NAME="$1"
|
|
local CONTAINS="$2"
|
|
local VALUE="$3"
|
|
|
|
[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && resetprop -n "$NAME" "$VALUE"
|
|
}
|