TrollFools Documentation

repository·main·Indexed 25 days ago

https://github.com/lessica/trollfools

An iOS utility for in-place tweak injection leveraging insert_dylib and ChOma, designed for environments using TrollStore (iOS 14.0 - 17.0). It supports removable system applications, decrypted App Store applications, and encrypted App Store applications with a bare dynamic library. The project includes a SwiftUI interface and a command-line tool, trollfoolscli, providing functionality to list, view, inject, and eject plugins from target applications.

Tokens
1.3K
Snippets
0
Records
18
Agent score
86%

What's inside TrollFools

  1. Supported application types in TrollFools

    main

    TrollFools supports the following application types for tweak injection:

    • Removable system applications
    • Decrypted App Store applications (TrollStore applications)
    • Encrypted App Store applications with a bare dynamic library
  2. Reload App injection status

    main
    Call the reload() method on an App instance to trigger a refresh of its isDetached, isAllowedToAttachOrDetach, isInjected, and hasPersistedAssets properties. This uses an internal PassthroughSubject to notify the instance to re-query the InjectorV3 engine.
  3. App class properties and state

    main

    The App class contains the following properties:

    Metadata

    • bid: The bundle identifier (String).
    • name: The display name (String).
    • latinName: A sanitized, Latin-character version of the name without diacritics or spaces.
    • type: The application type (e.g., "User") (String).
    • teamID: The developer team ID (String).
    • url: The file URL of the application bundle (URL).
    • version: The application version (String?).
    • isAdvertisement: Indicates if the app is an advertisement (Bool).

    Injection and Attachment State (@Published)

    • isDetached: Whether the metadata is detached in the bundle.
    • isAllowedToAttachOrDetach: Whether the user is allowed to attach/detach metadata (typically for "User" type apps).
    • isInjected: Whether the app bundle is currently injected.
    • hasPersistedAssets: Whether the app has persisted assets.

    Derived Helpers

    • icon: A UIImage retrieved using the bid.
    • isUser: true if type == "User".
    • isSystem: true if not a user app.
    • isFromApple: true if bid starts with com.apple..
    • isFromTroll: true if it is a system app but not from Apple.
    • isRemovable: true if the app URL is located within /var/containers/Bundle/Application/.
  4. Reference for the eject command arguments and options

    main

    The eject command accepts the following arguments, options, and flags:

    TypeNameDescription
    ArgumentbundleIdentifierThe bundle identifier of the application.
    Option--path, -pThe path of the plugin to eject.
    Flag--allEject all plugins from the application.

    Validation Rules:

    • If --all is used, --path cannot be specified.
    • If --all is NOT used, --path MUST be specified.
    • If the specified application or plugin path is invalid, the command will return a validation error.
  5. Reference for the inject command arguments and options

    main

    The following arguments, options, and flags are available for the inject command:

    • <bundleIdentifier> (Argument): The bundle identifier of the target application.
    • --path, -p (Option): The path of the plugin to inject. This option can be used multiple times to specify multiple plugins.
    • --fast (Flag): Enables the fast injection strategy.
    • --weak (Flag): Uses a weak reference for the injection.