[Magisk] Dark_Diver:
I've created for myself Windows .cmd scripts to extract props from "build.prop" and generate "pif.json" and "custom.pif.json" files and to upload them to the phone.

If you have several "*build.prop" files in one ROM, it can work incorrectly sometimes (theoretically), but you can try.

I used ROMs with only one "build.prop" in it.

Script is just trying to find the first needed prop in all *.prop files in current folder.

If you have more, than one "build.prop" file in the ROM, just make them different names, like "build.prop", "vendor.prop", etc. The file names can be anything, only the extension has to be ".prop".

Extract "pif_gen.cmd" and "pif_upload.cmd" from the attached zip-archive.

Place them and "build.prop" file(s), extracted from one ROM, in the same folder and run "pif_gen.cmd".

If you have "build.prop" files extracted from different ROMs, use different folder for every ROM.

Script "pif_gen.cmd" should generate two files: "pif.json" and "custom.pif.json".

Script create pif-files with Unix line endings.

Better to first analyze them - open in any text editor (Notepad, for example) and take a look - pif-files has to contain at least next props: "PRODUCT", "DEVICE", "MANUFACTURER", "BRAND", "MODEL" and "FINGERPRINT" with non-empty values. And with valid values - if you see in values something like "generic", "qti" - these props won't do.

Do not save files, opened in text editor! Text editor can save files with Windows line endings, we need Unix line endings.

If extracted props looks good, you can install one of generated json-files to the phone.

If not - try different ROM or try to find different build.prop in the Internet.

To install json-file you can:

1. Manually copy generated files to the phone, if you know how to do it:

If you use Magisk module "PlayIntegrityFix" from DEV branch, then copy generated "pif.json" into folder "/data/adb/" on your phone.

If you use Magisk module "PlayIntegrityFork", then copy generated "custom.pif.json" into folder "/data/adb/modules/playintegrityfix/" on your phone.

2. Or you can use script "pif_upload.cmd" to upload generated files to the phone via adb:

Enable "Developer options" on the phone: go to the "Settings -> My device -> Detailed info and specs" and tap on "MIUI version" several times till you see a message that "you became a developer".

After that go to the "Settings -> Additional settings -> Developer options" and enable "USB debugging".

Get adb working on your computer - if already not - go2google and search, how to do it.

Connect your phone to your computer with the cable.

Run the script "pif_upload.cmd" from the directory, where files "pif.json" and "custom.pif.json" are.

Script will ask, which file do you want to upload.

After you'll made a choice, script upload selected file to the phone, clears data of "Google Play", "Google Play Services" and "Google Wallet" apps, restarts them and restart DroidGuard to apply new props.

You have to check Play Integrity status on the phone, script will show you how.

If you'll see in Play Integrity check result both "MEETS_BASIC_INTEGRITY" and "MEETS_DEVICE_INTEGIRTY" - all is ok, your props are valid.

If not - go find another build.prop from different ROM and try one more time.