Automated CLI and GitHub Actions pipeline for building, validating, and publishing Play Integrity Fix JSON profiles.
Extract build properties from local files or upstream ZIP archives. Generate extended or legacy profiles automatically.
Releases · Latest Index · Upstream Beta
Requirements · Install · Build Profiles · Output Formats · Property Lookup · Automation · Development
pif-gen --help
Important
Get PIF Config Generator and prebuilt profiles from Elcapitanoe/PIF-Config-Generator, its official Releases, or releases/latest.json. Follow the installation and download links from these official sources.
- Python 3.11 or later
- A GitHub token for publishing releases or generating the release index
A GitHub token is optional when checking public upstream repositories, unless you reach the unauthenticated API rate limit.
git clone https://github.com/Elcapitanoe/PIF-Config-Generator.git
cd PIF-Config-Generator
python -m venv .venv
# Linux/macOS:
source .venv/bin/activate
# Windows PowerShell:
# .venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
python -m pip install -e '.[dev]'Check that the command is available:
pif-gen --helpThe runtime dependencies are requests, PyGithub, and pydantic. The dev extra also installs pytest.
Each build command takes exactly one input source: a local property file, one ZIP URL, or a JSON list of ZIP assets.
pif-gen build --file system.prop --output-dir outputThis creates output/system.json. The output name comes from the input file name. In this mode, --channel does not affect the output name.
The parser accepts plain key=value lines. It skips blank lines, comments beginning with #, and lines without =. It trims whitespace around keys and values. If a key appears more than once, the last value is used.
To capture properties from a connected Android device with ADB:
adb shell getprop \
| sed -E 's/^\[([^]]+)\]: \[([^]]*)\]$/\1=\2/' \
> system.prop
pif-gen build --file system.prop --output-dir outputUse the Yogi beta build from the v26.1029 release.
pif-gen build \
--url 'https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Yogi_beta_DP11.261016.004.zip' \
--channel beta \
--output-dir outputpif-gen build \
--url 'https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Yogi_beta_DP11.261016.004.zip' \
--channel beta \
--output-dir outputpif-gen build `
--url 'https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Yogi_beta_DP11.261016.004.zip' `
--channel beta `
--output-dir outputThe tool downloads the archive into memory and reads the first entry whose path ends in system.prop. The extracted file must be UTF-8 text. This command generates output/Yogi_beta_DP11.261016.004.json.
Pass --assets-json a JSON array of objects with name and url keys:
pif-gen build \
--channel beta \
--assets-json '[
{"name":"Komodo_beta_DP11.261016.003.zip","url":"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Komodo_beta_DP11.261016.003.zip"},
{"name":"Tokay_beta_DP11.261016.003.zip","url":"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Tokay_beta_DP11.261016.003.zip"}
]' \
--output-dir output \
--manifest output/manifest_beta.txtpif-gen build \
--channel beta \
--assets-json '[
{"name":"Komodo_beta_DP11.261016.003.zip","url":"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Komodo_beta_DP11.261016.003.zip"},
{"name":"Tokay_beta_DP11.261016.003.zip","url":"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Tokay_beta_DP11.261016.003.zip"}
]' \
--output-dir output \
--manifest output/manifest_beta.txtPowerShell 5.1 needs --% and escaped JSON quotes when passing --assets-json to pif-gen:
pif-gen --% build --channel beta --assets-json [{\"name\":\"Komodo_beta_DP11.261016.003.zip\",\"url\":\"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Komodo_beta_DP11.261016.003.zip\"},{\"name\":\"Tokay_beta_DP11.261016.003.zip\",\"url\":\"https://github.com/Elcapitanoe/Build-Prop-BETA/releases/download/v26.1029/Tokay_beta_DP11.261016.003.zip\"}] --output-dir output --manifest output/manifest_beta.txtThese commands use the v26.1029 beta release and generate Komodo_beta_DP11.261016.003.json and Tokay_beta_DP11.261016.003.json. To build profiles for other devices or use a newer beta, open the Build-Prop-BETA releases, select the release marked Latest, and find the ZIP asset for each device codename. Copy each asset's filename and download URL into the JSON array, replacing both the name and url values. Keep the release tag and asset filename from the same release.
The manifest lists the generated file paths, one per line. Pass it to pif-gen publish to upload those files. --manifest is used only with batch input; single-file and single-URL builds print the generated path instead.
| Option | Default | Description |
|---|---|---|
--file PATH |
None | Read one local property file |
--url URL |
None | Download one ZIP archive |
--assets-json JSON |
None | Read a JSON list of ZIP assets |
--output-dir DIR |
. |
Directory for generated profiles |
--format |
extended |
Output format: extended or legacy |
--channel |
stable |
Input channel: stable or beta |
--manifest PATH |
generated_files.txt |
Write a manifest for batch output |
ZIP requests time out after 120 seconds. In URL and batch modes, beta output names include a beta token. Local file output names are unchanged by the channel.
The default format is extended:
pif-gen build --file system.prop --format extended --output-dir outputUse legacy for consumers that expect the older set of fields:
pif-gen build --file system.prop --format legacy --output-dir outputThe generated build fields are:
ID
BRAND
DEVICE
MANUFACTURER
FINGERPRINT
MODEL
PRODUCT
SECURITY_PATCH
DEVICE_INITIAL_SDK_INT
TYPE
TAG
RELEASE
DEBUG
The format also includes these PIF settings. They are model defaults, not values read from system.prop.
| Field | Default |
|---|---|
spoofBuild |
"1" |
spoofProps |
"1" |
spoofProvider |
"0" |
spoofSignature |
"0" |
spoofVendingSdk |
"0" |
spoofVendingBuild |
"1" |
verboseLogs |
"0" |
DEBUG is true if ro.debuggable=1 or the resolved build type is userdebug or eng.
The legacy profile contains only these fields:
MANUFACTURER
MODEL
FINGERPRINT
BRAND
PRODUCT
DEVICE
SECURITY_PATCH
FIRST_API_LEVEL
For each extended field, the tool uses the first non-empty property in the listed order.
| Field | Property lookup order |
|---|---|
ID |
ro.system_ext.build.id, ro.system.build.id, ro.build.id, ro.vendor.build.id, ro.system_dlkm.build.id |
BRAND |
ro.product.system_ext.brand, ro.product.system.brand, ro.product.brand |
DEVICE |
ro.product.system_ext.device, ro.product.system.device, ro.product.device, ro.build.product, ro.product.board |
MANUFACTURER |
ro.product.system_ext.manufacturer, ro.product.system.manufacturer, ro.product.manufacturer |
MODEL |
ro.product.system_ext.model, ro.product.system.model, ro.product.model |
PRODUCT |
ro.product.system_ext.name, ro.product.system.name, ro.product.name, ro.build.product, ro.product.system_ext.device, ro.product.device, ro.product.board |
FINGERPRINT |
ro.system_ext.build.fingerprint, ro.system.build.fingerprint, ro.build.fingerprint, ro.product.build.fingerprint, ro.bootimage.build.fingerprint, ro.vendor.build.fingerprint, ro.system_dlkm.build.fingerprint |
DEVICE_INITIAL_SDK_INT |
ro.product.first_api_level, ro.board.first_api_level, ro.board.api_level, ro.system_ext.build.version.sdk, ro.system.build.version.sdk, ro.build.version.sdk |
RELEASE |
ro.system_ext.build.version.release, ro.system.build.version.release, ro.build.version.release, ro.build.version.release_or_codename |
TYPE |
ro.system_ext.build.type, ro.system.build.type, ro.build.type |
TAG |
ro.system_ext.build.tags, ro.system.build.tags, ro.build.tags |
For SECURITY_PATCH, these properties are checked first:
ro.build.version.security_patch
ro.vendor.build.security_patch
ro.system.build.version.security_patch
A direct value is used only if it is 10 characters long. If none qualifies, the tool extracts a date from the build ID, then from the fingerprint. For example, BP3A.251005.004 produces 2025-10-05.
The extended builder defaults BRAND to google, MANUFACTURER to Google, MODEL to Unknown, TYPE to user, TAG to release-keys, and the SDK value to 0. The SDK value is still validated, so the 0 fallback normally causes incomplete input to fail validation.
Profiles are validated before they are written:
SECURITY_PATCHmust be a valid calendar date inYYYY-MM-DDformat.DEVICE_INITIAL_SDK_INTandFIRST_API_LEVELmust be numeric strings with a value of at least21.- Required string fields cannot be empty.
- A ZIP archive must contain a readable
system.propfile. - In batch mode, failures are logged for each asset and the command exits with an error after processing the list.
The check command looks for new tags in these upstream repositories and compares them with the local state files:
| Channel | Repository | State file |
|---|---|---|
| stable | Pixel-Props/build.prop | state/last_stable_tag.txt |
| beta | Elcapitanoe/Build-Prop-BETA | state/last_beta_tag.txt |
pif-gen check --state-dir stateA GitHub token is optional for public repositories. If you hit the unauthenticated API rate limit, set GITHUB_TOKEN and run the command again:
export GITHUB_TOKEN='github_pat_...'
pif-gen check --state-dir stateIn PowerShell, set the variable with $env:GITHUB_TOKEN = 'github_pat_...'.
The command prints JSON containing new_release and a result for each channel with a new release. Each result includes its channel, tag, asset URLs, and asset count. check reads the files in state/ but does not update them. GitHub Actions updates the tag after a successful build.
Use publish to upload the files listed in a manifest to GitHub Releases:
export GITHUB_TOKEN='github_pat_...'
pif-gen publish \
--repo owner/repository \
--manifest output/manifest.txtBefore connecting to GitHub, the command checks that a token is available, the manifest is not empty, every listed file exists, and no two files have the same name. The token needs permission to read the repository and create releases. The workflow grants contents: write to its publish job.
Release tags use the current UTC date in vYY.MMDD format. For example, October 23, 2026 produces v26.1023. The release title matches the tag. If the release already exists, it is reused, and assets with existing filenames are skipped. Upload failures are reported after the remaining files have been attempted.
The .github/workflows/update-latest-index.yml workflow updates releases/latest.json after the profile generation workflow succeeds. It can also be started manually from GitHub Actions.
The index selects the newest published release for stable and beta independently, so the channels can point to different release tags. It is committed only when its contents change.
Raw index URL:
https://raw.githubusercontent.com/Elcapitanoe/PIF-Config-Generator/main/releases/latest.json
The channels.stable and channels.beta objects contain release metadata and profile entries. Each profile entry includes its filename, immutable release download URL, SHA-256 checksum, size, channel, codename, device name, and manufacturer. These device details come from the profile: DEVICE is the codename, MODEL is the device name, and MANUFACTURER is the manufacturer.
The index also records the generator repository, package version, and release tag. Consumers can read the index and download profiles without using the GitHub API.
To generate or repair the index manually:
export GITHUB_TOKEN='github_pat_...'
pif-gen index --repo owner/repository --output releases/latest.json.github/workflows/generate-pif.yml runs daily at 02:00 UTC and can also be started manually. It:
- installs the package and runs the test suite;
- checks for upstream releases;
- builds stable and beta assets in parallel when new releases are found;
- validates the generated JSON files;
- combines the files into one manifest;
- publishes a GitHub Release;
- updates the upstream tag state files.
The state update runs git pull --rebase origin main and pushes to main, so this workflow assumes that branch exists. After the generation workflow succeeds, the index workflow independently finds the latest stable and beta releases, writes releases/latest.json, validates it, and commits it to the default branch if it changed.
Install the development dependencies and run the tests:
python -m pip install -e '.[dev]'
pytest tests/Source code is in src/pif_generator/:
builder.py: parses properties, extracts ZIP contents, and builds profilesmodels.py: defines Pydantic models and validatorspipeline.py: coordinates profile generation and output filenamesrelease.py: handles GitHub API operationscli.py: defines thepif-gencommand-line interface