Skip to content

FrameworksForge/FrameworkPatcherBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Framework Patcher Bot

A powerful Telegram bot designed to automate the patching of Android framework files (framework.jar, services.jar, miui-services.jar) for Xiaomi devices. This bot interfaces with GitHub Actions to perform complex patching tasks in a secure environment.

Features

  • Automated Workflow Triggering: Automatically detects the correct API level and triggers the corresponding GitHub Action.
  • Support for Multi-Features:
    • Signature Verification Bypass
    • CN Notification Fix (Android 15+)
    • Secure Flag Disable (Android 15+)
    • Kaorios Toolbox / Play Integrity Fix (Android 15+)
  • Device Database: Integration with Xiaomi firmware trackers to suggest/validate device codenames and ROM versions.
  • Manual Mode: Allows users to manually enter ROM and Android versions if not found in the database.
  • Safe Tagging: Robust sanitization of release tags and version names for reliable GitHub Releases.

Setup & Deployment

Prerequisites

  • Linux server (Ubuntu/Debian recommended)
  • Python 3.10+
  • Git
  • Telegram Bot Token (from @BotFather)
  • GitHub Personal Access Token (Classic recommended with workflow scope)

Quick Deployment

Clone the repository and run the deployment script:

git clone https://github.com/FrameworksForge/FrameworkPatcherBot.git
cd FrameworkPatcherBot
chmod +x deploy.sh
./deploy.sh

The script will guide you through:

  1. Creating a .env file for your credentials.
  2. Setting up a Python virtual environment.
  3. (Optional) Creating a systemd service for 24/7 uptime.

Configuration

Your .env file should contain the following:

BOT_TOKEN=your_telegram_bot_token
API_ID=your_telegram_api_id
API_HASH=your_telegram_api_hash
GITHUB_TOKEN=your_github_token
GITHUB_OWNER=FrameworksForge
GITHUB_REPO=FrameworkPatcher
PIXELDRAIN_API_KEY=your_pixeldrain_api_key

# Optional workflow file overrides
GITHUB_WORKFLOW_ID_A13=android13.yml
GITHUB_WORKFLOW_ID_A14=android14.yml
GITHUB_WORKFLOW_ID_A15=android15.yml
GITHUB_WORKFLOW_ID_A16=android16.yml

# Bot queue and tracking tuning
GLOBAL_ACTIVE_BUILDS_LIMIT=5
WORKFLOW_RUN_DISCOVERY_TIMEOUT=180
WORKFLOW_RUN_POLL_TIMEOUT=7200
WORKFLOW_RUN_POLL_INTERVAL=20

Build Tracking Behavior

  • After workflow dispatch, the bot now tracks the GitHub Actions run and sends a follow-up notification on success or failure.
  • Failure notifications include a direct workflow run link for debugging.
  • A global active-build cap is enforced to prevent CI overload during spikes.
  • Android 13/14 remain supported and runnable, but are surfaced to users as legacy builds.

Credits


Maintained by the FrameworksForge Community.

About

Bot designed to automate the patching of Android framework files for Xiaomi devices

Topics

Resources

Stars

Watchers

Forks

Contributors