Skip to content

UnknownCollections/ptcgp_tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PTCGP Utility Tool

A command-line or text-based user interface (TUI) multi-tool designed for interacting with PTCGP files, specifically targeting APKs, XAPKs, IL2CPP binaries, and metadata files.

The primary purpose of this tool is to facilitate learning about Unity and reverse engineering techniques. Written entirely in Rust, the codebase emphasizes clarity and thorough documentation, with extensive comments. This approach aims to educate users on how specific processes work, enabling them to better understand both Unity internals and reverse engineering practices. Users are explicitly advised to refrain from using this tool for any illegal or unethical purposes.

Features

  • Extract Protobuf Definitions: Extract protobuf definitions from APK, XAPK, or IL2CPP metadata files.
  • Patch IL2CPP: Patch IL2CPP binaries to remove modification detection by updating code hashes. Not fully tested.

ptcgp_tool_demo.mp4

Releases

The game has changed Unity versions over time. There are build flags to determine which Unity version to support. The releases page has all versions build. The default version supports the latest Unity version.

  • APK Version 1.1.2 and before is Unity version 2022322f1
  • APK Version 1.2.0 is Unity version 2022356f1

Installation

Prerequisites

  • Rust (1.85 or later)

Building from Source

git clone https://github.com/UnknownCollections/ptcgp_tool.git
cd ptcgp_tool
cargo build --release

Optionally, select a specific unity version to support:

cargo build --release --no-default-features --features 2022322f1

Running

./target/release/ptcgp_tool [OPTIONS] <COMMAND>

Usage

CLI Mode

Extract Protobuf Definitions:

./ptcgp_tool --headless extract-proto --output <OUTPUT_DIR> [--apk <APK_PATH>] [--il2cpp <IL2CPP_PATH> --global-metadata <METADATA_PATH>] [--overwrite]

Patch IL2CPP:

./ptcgp_tool --headless patch <MODIFIED_OUTPUT_PATH> [--apk <APK_PATH>] [--il2cpp <IL2CPP_PATH>] [--global-metadata <METADATA_PATH>]

Verbose Logging:

./ptcgp_tool --verbose extract-proto --output <OUTPUT_DIR> [OPTIONS]

TUI Mode

Launch the interactive TUI:

./ptcgp_tool

Commands

extract-proto

Extract protobuf definitions.

  • --apk <APK>: Path to an APK file.
  • --il2cpp <IL2CPP>: Path to the IL2CPP file.
  • --global-metadata <GLOBAL_METADATA>: Path to the global-metadata file.
  • --output <OUTPUT>: Output directory.
  • --overwrite: Overwrite existing output.

patch

Patch IL2CPP file hashes.

  • <MODIFIED>: Path for the modified IL2CPP file.
  • Optional paths to original APK, IL2CPP, and metadata files.

Use --help to display detailed command options:

./ptcgp_tool extract-proto --help
./ptcgp_tool patch --help

Contributing

Contributions are welcome!

License

This project is licensed under The Unlicense License. See LICENSE for details.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages