mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 11:02:20 +08:00
29 lines
877 B
Bash
29 lines
877 B
Bash
|
resetprop_if_diff() {
|
||
|
local NAME=$1
|
||
|
local EXPECTED=$2
|
||
|
local CURRENT=$(resetprop $NAME)
|
||
|
|
||
|
[ -z "$CURRENT" ] || [ "$CURRENT" == "$EXPECTED" ] || resetprop $NAME $EXPECTED
|
||
|
}
|
||
|
|
||
|
resetprop_if_match() {
|
||
|
local NAME=$1
|
||
|
local CONTAINS=$2
|
||
|
local VALUE=$3
|
||
|
|
||
|
[[ "$(resetprop $NAME)" == *"$CONTAINS"* ]] && resetprop $NAME $VALUE
|
||
|
}
|
||
|
|
||
|
# Avoid breaking Realme fingerprint scanners
|
||
|
resetprop_if_diff ro.boot.flash.locked 1
|
||
|
|
||
|
# Avoid breaking Oppo fingerprint scanners
|
||
|
resetprop_if_diff ro.boot.vbmeta.device_state locked
|
||
|
|
||
|
# Avoid breaking OnePlus display modes/fingerprint scanners
|
||
|
resetprop_if_diff vendor.boot.verifiedbootstate green
|
||
|
|
||
|
# Avoid breaking OnePlus/Oppo display fingerprint scanners on OOS/ColorOS 12+
|
||
|
resetprop_if_diff ro.boot.verifiedbootstate green
|
||
|
resetprop_if_diff ro.boot.veritymode enforcing
|
||
|
resetprop_if_diff vendor.boot.vbmeta.device_state locked
|