Skip to content

shoey63/PiFork-Scheduler

Repository files navigation

PiFork Scheduler

PiFork Scheduler is a robust automation module for managing Play Integrity Fork updates. It combines the reliability of native Android cron scheduling with the flexibility of Termux to keep your integrity fingerprints up to date automatically.

🚀 Features

  • Automated Updates: Runs silently in the background (Default: Daily at 4:00 AM).
  • Smart Scheduling: Supports "Standard" (Daily) or "Hybrid" (Weekly download + Daily refresh) schedules.
  • Action Button Support: Check service status, view the next scheduled run time, or force stop/start the service directly from your root manager.
  • Termux Integration: Automatically injects the helper script (update_pifork.sh) into Termux for easy manual updating or advanced logic.
  • Conflict-Free: Intelligent process management ensures no overlap with manual updates.

📥 Installation

  1. Download the latest release zip.
  2. Install via Magisk, KernelSU, or APatch.
  3. Reboot your device.

Note: If you use Termux, it is recommended to have Termux installed before flashing this module so the permissions for the helper script are set automatically.


⚙️ Configuration

1. The Schedule (Cron)

The schedule is defined in the root file located at: /data/adb/modules/pifork-scheduler/root

You can edit this file to customize when the update runs.

  • Standard (Default): Runs everyday at 4:00 AM.
  • Hybrid: Uncomment the provided lines to run a full download on Sundays and a local refresh on other days.

2. The Action Button

Use the Action Button in your root manager (Magisk/KSU) to:

  • View Status: See if the scheduler is running.
  • Check Schedule: Displays the exact time of the "Next Run" (e.g., 🗓️ Mon-Sat @ 04:00).
  • Pause/Resume: Toggling the button stops or restarts the background daemon.

🖥️ Termux Integration

During installation, the module attempts to detect Termux and installs a helper script to: /data/data/com.termux/files/home/update_pifork.sh

This allows you to trigger updates manually from a terminal environment.

If Termux was not detected during install:

  1. Install Termux from F-Droid or GitHub.
  2. Reinstall this module. (This is required to automatically set the correct ownership and execution permissions for the script).

🛠️ Termux Setup

To ensure update_pifork.sh runs correctly, you need to set up a few basic packages in Termux.

1. Update Termux Open Termux and ensure your packages are up to date:

pkg update && pkg upgrade

2. Install Prerequisites Install git and the GitHub CLI (gh), which are often required for fetching updates:

pkg install git gh

3. Authenticate GitHub (One-Time Setup) To allow the script to access repositories, link Termux to your GitHub account:

gh auth login
  • Select GitHub.com
  • Protocol: HTTPS
  • Authenticate: Login with a web browser (Recommended for mobile)
  • Copy the 8-digit code shown in Termux, paste it into the browser window that opens, and authorize.

⚠️ Security Disclaimer & Supply Chain

Please Read Carefully:

The included helper script (update_pifork.sh) is designed to download and execute code from a remote source to automatically update your Play Integrity fingerprints.

  • Remote Execution: This script fetches the latest build artifacts (including executable scripts) directly from GitHub and runs them as Root.
  • Source of Truth: The source repository is defined in the configuration section of the script:
    REPO="osm0sis/PlayIntegrityFork"
  • User Responsibility: You are effectively granting root access to code produced by the repository owner defined in that variable.
    • It is strongly recommended that you review the contents of /data/data/com.termux/files/home/update_pifork.sh before running it.
    • Verify that the REPO variable matches a trusted developer (default: osm0sis).

🤝 Credits

  • osm0sis - For the foundational work on PlayIntegrityFork.
    • Fix Play Integrity <A13 verdicts, allowing custom fields and props.

📜 License

This project is open source. Feel free to fork, modify, and distribute.

📝 Changelog

v1.0.7

  • Enhancement: silence autopif 'bad date' warning as it automatically switches to busybox anyway if date is incompatible.
  • Information: Update Readme Security Disclaimer and add Supply Chain information.

v1.0.5

  • Fix: cron execution now resolves latest autopif script at runtime
  • Fix: conditional cleanup prevents version conflicts
  • Fix: permission repair is now idempotent and non-destructive
  • Fix: don't use find -printf (not supported by toybox) Use ls -t to sort autopif by latest
  • Fix: Rework permissions fix

v1.0.0

Bump pre-release 0.2.3 to release 1.0.0


v0.2.3

Initial pre-release

About

Downloads and updates latest PiFork CI build plus updates fingerprint daily. Use Action Button to pause/reload schedule. Requires Termux and a GitHub account (free).

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages