mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-03-13 23:07:30 +08:00
action: update to inject pif.json format
This commit is contained in:
parent
7aea0da641
commit
d8548d8a5b
@ -99,10 +99,14 @@ sdk_version="${sdk_version:-25}"
|
||||
echo "Device SDK version: $sdk_version"
|
||||
|
||||
# Preserve previous setting
|
||||
spoofVending="$(grep -oE '"spoofVendingSdk": [01]' "$MODDIR/pif.json" | cut -d' ' -f2)"
|
||||
if [ -z "$spoofVending" ] || [ "$spoofVending" != 1 ]; then
|
||||
spoofVending=0
|
||||
fi
|
||||
spoofConfig="spoofProvider spoofProps spoofSignature DEBUG"
|
||||
for config in $spoofConfig; do
|
||||
if grep -q "\"$config\": true" "$MODDIR/pif.json"; then
|
||||
eval "$config=true"
|
||||
else
|
||||
eval "$config=false"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "- Dumping values to pif.json ..."
|
||||
cat <<EOF | tee pif.json
|
||||
@ -112,7 +116,10 @@ cat <<EOF | tee pif.json
|
||||
"MODEL": "$MODEL",
|
||||
"SECURITY_PATCH": "$SECURITY_PATCH",
|
||||
"DEVICE_INITIAL_SDK_INT": $sdk_version,
|
||||
"spoofVendingSdk": $spoofVending
|
||||
"spoofProvider": $spoofProvider,
|
||||
"spoofProps": $spoofProps,
|
||||
"spoofSignature": $spoofSignature,
|
||||
"DEBUG": $DEBUG
|
||||
}
|
||||
EOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user