mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-04-29 17:42:11 +08:00
installation: preserve previous setting
This commit is contained in:
parent
2ec00781e5
commit
70fd04ad6e
@ -61,10 +61,16 @@ if [ -d "/data/adb/modules/MagiskHidePropsConf" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Preserve previous setting
|
# Preserve previous setting
|
||||||
spoofVending="$(grep -oE '"spoofVendingSdk": [01]' "/data/adb/modules/playintegrityfix/pif.json" | cut -d' ' -f2)"
|
spoofConfig="spoofProvider spoofProps spoofSignature DEBUG"
|
||||||
if [ -n "$spoofVending" ] && [ "$spoofVending" -eq 1 ]; then
|
for config in $spoofConfig; do
|
||||||
sed -i 's/"spoofVendingSdk": 0/"spoofVendingSdk": 1/' "$MODPATH/pif.json"
|
grep -q "$config" "/data/adb/modules/playintegrityfix/pif.json" || continue
|
||||||
|
if grep -q "\"$config\": true" "/data/adb/modules/playintegrityfix/pif.json"; then
|
||||||
|
sed -i "s/\"$config\": .*/\"$config\": true,/" "$MODPATH/pif.json"
|
||||||
|
else
|
||||||
|
sed -i "s/\"$config\": .*/\"$config\": false,/" "$MODPATH/pif.json"
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
sed -i ':a;N;$!ba;s/,\n}/\n}/g' "$MODPATH/pif.json"
|
||||||
|
|
||||||
# Check custom fingerprint
|
# Check custom fingerprint
|
||||||
if [ -f "/data/adb/pif.json" ]; then
|
if [ -f "/data/adb/pif.json" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user