### Boot Scripts (post-fs-data.sh, service.sh) Source: https://context7.com/kowx712/playintegrityfix/llms.txt Scripts executed during the Android boot sequence. `post-fs-data.sh` runs early, while `service.sh` runs after boot completes, sourcing common functions and applying property spoofing. It also includes examples of `resetprop` usage for build properties and security patches. ```bash # post-fs-data.sh - Runs early in boot (before most services) # Currently minimal, Zygisk handles most work # service.sh - Runs after boot completes # Sources common functions and executes property spoofing # Example property overrides via resetprop: resetprop -n ro.build.fingerprint "google/oriole_beta/oriole:CANARY/" resetprop -n ro.build.version.security_patch "2026-03-05" # Module action (action.sh) - Runs when user taps module in manager # Launches WebUI or falls back to autopif.sh ``` -------------------------------- ### CMakeLists.txt Configuration Source: https://github.com/kowx712/playintegrityfix/blob/inject_s/zygisk/src/main/cpp/CMakeLists.txt Defines the build configuration for the 'zygisk' project using CMake. It specifies the minimum required CMake version, project name, library linking, and module inclusion. Ensure CMake version 3.30.5 or higher is installed. ```cmake cmake_minimum_required(VERSION 3.30.5) project("zygisk") link_libraries(log) find_package(cxx REQUIRED CONFIG) link_libraries(cxx::cxx) add_library(zygisk SHARED zygisk.cpp pif_config.cpp local_cxa_atexit_finalize_impl/atexit.cpp) add_subdirectory("${CMAKE_CURRENT_SOURCE_DIR}/Dobby" Dobby) target_link_libraries(zygisk PRIVATE dobby_static) ``` -------------------------------- ### Check ROM Signature During Installation Source: https://context7.com/kowx712/playintegrityfix/llms.txt This script snippet checks the ROM signature to determine if spoofSignature should be enabled. It's part of the installation process for Play Integrity Fix. ```bash # Check ROM signature to determine if spoofSignature should be enabled unzip -l /system/etc/security/otacerts.zip | grep -oE "testkey|releasekey" # Output: "testkey" means spoofSignature should be enabled # Output: "releasekey" means spoofSignature should be disabled ``` -------------------------------- ### WebUI Configuration Interface Source: https://context7.com/kowx712/playintegrityfix/llms.txt The module includes a web-based configuration interface accessible via supported managers like KSUWebUI, MMRL, or WebUI X. It allows fetching fingerprints, viewing properties, toggling spoofing options, and writing configurations to specified files. ```javascript // WebUI runs in KSUWebUI, MMRL, or WebUI X apps // Accessible via module action button // Available actions: // - Fetch: Download fingerprint from GitHub or run autopif.sh // - View: Display current pif.prop contents // - Auto security patch: Toggle TrickyStore integration // - Script only mode: Disable Zygisk injection, use scripts only // Toggle switches for each spoofing option: // - Spoof Build (GMS) // - Spoof Build (Play Store) // - Spoof Props // - Spoof Provider // - Spoof Signature // - Spoof SDK // Configuration changes are written to: // - /data/adb/pif.prop // - /data/adb/modules/playintegrityfix/pif.prop // Changes take effect after killing GMS processes ``` -------------------------------- ### Check Certificate Keys Source: https://github.com/kowx712/playintegrityfix/blob/inject_s/webui/index.html Use this command to list and filter certificate keys from the otacerts.zip file. It helps identify test or release keys present in the system's OTA certificates. ```bash unzip -l /system/etc/security/otacerts.zip | grep -oE "testkey|releasekey" ``` -------------------------------- ### Java EntryPoint (DEX Injection) Source: https://context7.com/kowx712/playintegrityfix/llms.txt The injected DEX payload handles KeyStore and signature spoofing at the Java level. It wraps the original KeyStoreSpi, intercepts certificate chain requests, and modifies attestation results. It also spoofs the ROM signing certificate by replacing PackageInfo.CREATOR and updates Build.* static fields via reflection. ```java // Entry point called from native code after Zygisk injection // es.chiteroman.playintegrityfix.EntryPoint.init(jsonProps, spoofProvider, spoofSignature, spoofBuild) // spoofProvider: Replaces AndroidKeyStore provider // - Wraps original KeyStoreSpi with CustomKeyStoreSpi // - Intercepts certificate chain requests // - Returns modified attestation results // spoofSignature: Spoofs ROM signing certificate // - Replaces PackageInfo.CREATOR with custom implementation // - Returns Google's official Android platform certificate // - Affects PackageManager signature verification // spoofBuild: Updates Build.* static fields via reflection // - BRAND, PRODUCT, DEVICE, MODEL, MANUFACTURER // - FINGERPRINT, ID, INCREMENTAL, TYPE, TAGS // - VERSION.RELEASE, VERSION.SECURITY_PATCH ``` -------------------------------- ### Integration with TrickyStore Source: https://context7.com/kowx712/playintegrityfix/llms.txt PIF can integrate with the TrickyStore module for enhanced keybox attestation. This involves touching a file to enable auto-sync between PIF and TrickyStore, allowing PIF to automatically update TrickyStore's security patch configuration when the fingerprint changes. ```bash # TrickyStore stores security patch config at: # Official: /data/adb/tricky_store/security_patch.txt # James fork: /data/adb/tricky_store/devconfig.toml # security_patch.txt format: system=202603 boot=2026-03-05 vendor=2026-03-05 # devconfig.toml format: securityPatch = "2026-03-05" # Enable auto-sync between PIF and TrickyStore: touch /data/adb/tricky_store/pif_auto_security_patch # PIF will automatically update TrickyStore config when fingerprint changes ``` -------------------------------- ### Zygisk Module Entry Point (zygisk.cpp) Source: https://context7.com/kowx712/playintegrityfix/llms.txt The C++ Zygisk module hooks into app processes to apply spoofing based on configuration. It targets packages like DroidGuard and Play Store, reading configuration from properties and intercepting system properties for spoofing. ```cpp // Module targets these packages: // - com.google.android.gms.unstable (DroidGuard) - integrity checks // - com.android.vending (Play Store) - optional SDK spoofing // Configuration is read from: // 1. /data/adb/pif.prop (custom, takes priority) // 2. /data/adb/modules/playintegrityfix/pif.prop (default) // Property callback hook intercepts these system properties: // - init.svc.adbd → "stopped" (hide ADB) // - sys.usb.state → "mtp" (hide USB debugging) // - *.api_level → spoofed SDK version // - *.security_patch → spoofed patch date // - *.build.id → spoofed build ID // For DroidGuard (gms.unstable): // - spoofBuild: Updates android.os.Build.* fields // - spoofProvider: Injects custom KeyStore provider // - spoofSignature: Spoofs ROM signing certificate // - spoofProps: Hooks __system_property_read_callback // For Play Store (vending): // - spoofVendingBuild: Updates Build fields // - spoofVendingSdk: Spoofs Build.VERSION.SDK_INT to 32 ``` -------------------------------- ### Enable/Disable Auto Security Patch Sync Source: https://context7.com/kowx712/playintegrityfix/llms.txt The security_patch.sh script synchronizes the security patch level with the TrickyStore module for keybox attestation. It can be enabled, disabled, or executed manually. ```bash # Enable auto security patch sync sh /data/adb/modules/playintegrityfix/security_patch.sh --enable # Disable auto security patch sync sh /data/adb/modules/playintegrityfix/security_patch.sh --disable # Manual execution (reads from pif.prop, updates TrickyStore config) sh /data/adb/modules/playintegrityfix/security_patch.sh # Creates system.prop for persistent property override: # ro.build.version.security_patch=2026-03-05 # ro.vendor.build.security_patch=2026-03-05 ``` -------------------------------- ### Configure Device Fingerprint and Spoofing Options Source: https://context7.com/kowx712/playintegrityfix/llms.txt The pif.prop file controls device fingerprint spoofing and various feature toggles. Adjust these settings to customize how your device appears to Google Mobile Services. ```properties # Device fingerprint - format: brand/product/device:release/id/incremental:type/tags FINGERPRINT=google/oriole_beta/oriole:CANARY/ZP11.260220.007/14993212:user/release-keys # Device identification MANUFACTURER=Google MODEL=Pixel 6 SECURITY_PATCH=2026-03-05 # Spoofing options spoofBuild=true # Spoof Build.* fields (enabled by default) spoofProps=false # Hook system property reads (enable without TrickyStore) spoofProvider=false # Custom keystore provider (enable without TrickyStore) spoofSignature=false # Spoof ROM signature (enable for testkey ROMs) spoofVendingBuild=true # Spoof Build fields in Play Store spoofVendingSdk=false # Spoof SDK version to 32 in Play Store (Android 13+) # Debug logging DEBUG=false ``` -------------------------------- ### Add Language Entry to languages.json Source: https://github.com/kowx712/playintegrityfix/blob/inject_s/webui/public/locales/GUIDE.md Add a new language entry to the languages.json file. Ensure the language code follows the standard and maintain alphabetical order. The format is "language-code": "Language name in your language". ```json { "en": "English", "fr": "Français", // Your language, keep alphabetical order "zh-CN": "简体中文" } ``` -------------------------------- ### Manually Switch Language with Browser Console Source: https://github.com/kowx712/playintegrityfix/blob/inject_s/webui/public/locales/GUIDE.md Use this JavaScript snippet in the browser console to manually switch the application's language. This is useful for testing translations. The function `loadTranslations` takes the language code as an argument. ```javascript loadTranslations('zh-CN'); ``` -------------------------------- ### Fetch Latest Pixel Canary Fingerprint Source: https://context7.com/kowx712/playintegrityfix/llms.txt The AutoPIF script automatically fetches the latest Pixel Canary fingerprint from Google's developer portal and updates the pif.prop file. It can also list available Pixel devices or select specific ones via environment variables. ```bash # Run via Magisk/KernelSU action button or terminal sh /data/adb/modules/playintegrityfix/autopif.sh # List available Pixel devices sh /data/adb/modules/playintegrityfix/autopif.sh --list # Output: {"model":["Pixel 6","Pixel 7",...], "product":["oriole_beta","panther_beta",...]} # Select specific device (via environment variables) MODEL="Pixel 9 Pro XL" PRODUCT="komodo_beta" sh /data/adb/modules/playintegrityfix/autopif.sh # The script: # 1. Downloads Pixel version info from developer.android.com # 2. Fetches canary build details from flash.android.com # 3. Retrieves security patch from source.android.com/docs/security/bulletin # 4. Generates new pif.prop with updated fingerprint # 5. Saves to /data/adb/pif.prop # 6. Kills GMS processes to apply changes immediately ``` -------------------------------- ### Shell Helper Functions (common_func.sh) Source: https://context7.com/kowx712/playintegrityfix/llms.txt Utility functions used across module scripts for tasks like resetting properties conditionally, downloading files with fallback mechanisms, and pausing execution. ```bash # Source the common functions . /data/adb/modules/playintegrityfix/common_func.sh # Reset property only if different from expected value resetprop_if_diff "ro.build.fingerprint" "google/oriole/oriole:14/" # Reset property if it contains a specific string resetprop_if_match "ro.build.description" "userdebug" "user" # Download with fallback (uses curl or busybox wget) download "https://example.com/file" "output_file" # Pause for APatch/KernelSU (not needed for Magisk) sleep_pause ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.