Configuration the Loader

Depending on the data received the loader will change functionality. The default path of where it obtains said data is from https://palera.in/loader.json, in the form of a self-hosted JSON file containing data to determine what OS you’re on, platform, and the environment you’ve chosen when you used palera1n.

The configuration was updated as of June 5th 2024, previous documentation on lower beta versions of palera1n can be found in older commits.

Example JSON that’s valid and used by default inside the app: https://palera.in/loaderv2.json

Instructions

  1. Create the file, and make sure it’s in the JSON format.

  2. Make sure the file is hosted on a secure server or webpage; to easily host somewhere with no extra cost look into making sites via Cloudflare or Github Pages.

  3. Follow the documentation carefully.

Table of Contents

Metadata

When making a configuration, it is recommended you consider possibilities of what palera1n version they’re using, platform, and iOS they would be running.


Basic

{
    "min_loader_version": "2.1", 
    "palera1n_version_with_min_loader": "2.0",
    "min_bridge_bootstrapper_version": "1.0",
    "footer_notice": "Example footer notice",
    "contents": []
}

min_loader_version (string) required

Minimum loader version that the configuration supports. — If the app version is lower than minimum required then it will tell you to update to the latest palera1n version with an alert.

palera1n_version_with_min_loader (string) required

The minimum loader version the latest version of palera1n supports. — As of the versions after beta 9, only 2.0+ is supported.

min_bridge_bootstrapper_version (string) optional

footer_notice (string) required

Message displayed in a section footer. — Usually used as a means of telling users emergency or important messages related to palera1n/jailbreaking in general.

contents (array) required


Contents

"contents": [
    {
        "platform": 3,
        "rootful": {}
        "rootless": {}
    }
]

platform (int) required

The device platform type.

Uses dyld_get_active_platform() -> UInt32 to determine what platform you’re on.

1:  macOS
2:  iOS
3:  tvOS / HomePod
5:  bridgeOS
6:  macCatalyst
0:  Unknown

For simulated device types, they’re not listed and are considered unknown according to the app, so the app will attempt to go to a default of iOS or tvOS, if not, it will stay as 0.

rootful (nested) optional

Rootful environment type specified from CLI. — (flags & (1 << 0)) != 0

rootless (nested) optional

Rootless environment type specified from CLI. — (flags & (1 << 1)) != 0


Environment

"rootful": {
    "dotfile": "/.procursus_strapped",
    "bootstraps": [],
    "managers": [],
    "repositories": []
}

dotfile (string) unused

bootstraps (array) required

managers (array) required

repositories (array) required


Bootstraps

{
    "cfver": 1800,
    "uri": "https://static.palera.in/bootstraps/appletvos-arm64/1800/tvbootstrap-1800.tar.zst",
    "bootstrap-debs": [
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/autosign_2.0.3_appletvos-arm64.deb",
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/dhinakg-keyring_2023.04.02_all.deb",
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/ellekit_1.1.2-palera1n_appletvos-arm64.deb",
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/ldid_2.1.5-procursus7_appletvos-arm64.deb",
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/libkrw0-tfp0_1.1.1_appletvos-arm64.deb",
        "https://static.palera.in/bootstraps/appletvos-arm64/1800/libplist3_2.2.0+git20230130.4b50a5a_appletvos-arm64.deb"
    ]
}

cfver (int) required

OS CoreFoundation version. — Uses Int(floor(kCFCoreFoundationVersionNumber / 100) * 100).

...
1700: 14.x
1800: 15.x
1900: 16.x
2000: 17.0
2100: 17.1
2200: 17.2
2300: 17.3
2400: 17.4
2500: 17.5
...

Depending on your OS, the loader will determine what bootstrap will be most appropriate for you, for example, if you’re on iOS 18 then it will choose the latest available bootstrap (that normally would be for iOS 16, but instead be able to use it on iOS 18). The reverse will not work, being on iOS 13 will show bootstraps being unavailable.

// How its determined if you have a matching bootstrap
let sortedItems = basePath?.bootstraps.sorted { $0.cfver > $1.cfver }
    guard let bootstrapDetails = sortedItems!.first(where: { $0.cfver == corefoundationVersionShort }) ?? sortedItems!.first(where: { $0.cfver < corefoundationVersionShort }) else {
        // This will make an alert appear, telling the user that they are unable to use the configuration.
        log(type: .fatal, msg: "No matching bootstrap found.")
        return
}

uri (string) required

Main bootstrap URL. — Needs to be either a tar or tar.gz file.

bootstrap-debs (Array) required

Bootstrap array that contains strings to debs. — These are force installed using dpkg -i.

libkrw0-tfp0 is required to be installed when bootstrapping, if it's missing then the provided managers will yell at you.


Managers

{
    "name": "PurePKG",
    "uri": "https://github.com/Lrdsnow/PurePKG/releases/latest/download/uwu.lrdsnow.purepkg_appletvos-arm64.deb",
    "icon": "https://github.com/Lrdsnow/PurePKG/raw/215b3f4b0b3c86a7637d8013305c58da9d08d4a8/PurePKG/Assets.xcassets/AppIcon.appiconset/Untitled%20drawing-29-2.png",
    "filePath": "/Applications/PurePKG.app"
}

name (string) required

Package manager name (i.e. Sileo, Zebra).

uri (string) required

Debian package path.

icon (string) required

Valid image file that is displayed in the table.

filePath (string) required

This is so the loader determines if you have the package manager installed. Although, it’s very pointless in reality, as all it does is change a string showing that it’s installed. It will be force installed the same way as if it’s not installed.


Repositories

{
    "Types": "deb",
    "URIs": "https://repo.palera.in",
    "Suites": "./",
    "Components": ""
}

These are written to a hardcoded sources path, being:

"\(prefix)/etc/apt/sources.list.d/palera1n.sources"

Contents:

Types: deb
URIs: https://repo.palera.in
Suites: ./
Components:

...

Types (string) required

URIs (string) required

Suites (string) required

Components (string) required


Example

This is what the configuration should look like at the end, the loader should tell you if it’s valid or not when debugging via Xcode.

If you’re not trying to use Xcode to debug, make sure you proof read your configuration in making sure its correct so it displays properly.

{
  "min_loader_version": "2.1",
  "palera1n_version_with_min_loader": "2.0",
  "min_bridge_bootstrapper_version": "1.0",
  "footer_notice": "Example!",
  "contents": [
    {
      "platform": 2,
      "rootful": {
        "dotfile": "/.procursus_strapped",
        "bootstraps": [
          {
            "cfver": 1700,
            "uri": "https://static.palera.in/bootstraps/iphoneos-arm64/1700/bootstrap-1700.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/iphoneos-arm64/1700/dhinakg-keyring_2023.04.02_all.deb"
            ]
          },
          {
            "cfver": 1800,
            "uri": "https://static.palera.in/bootstraps/iphoneos-arm64/1800/bootstrap-1800.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/iphoneos-arm64/1800/dhinakg-keyring_2023.04.02_all.deb"
            ]
          },
          {
            "cfver": 1900,
            "uri": "https://static.palera.in/bootstraps/iphoneos-arm64/1900/bootstrap-1900.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/iphoneos-arm64/1900/dhinakg-keyring_2023.04.02_all.deb"
            ]
          },
          {
            "cfver": 2000,
            "uri": "https://static.palera.in/bootstraps/iphoneos-arm64/2000/bootstrap-2000.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/iphoneos-arm64/2000/dhinakg-keyring_2023.04.02_all.deb"
            ]
          }
        ],
        "managers": [
          {
            "name": "Sileo",
            "uri": "https://static.palera.in/sileo.deb",
            "icon": "https://palera.in/assets-config/sileo.png",
            "filePath": "/Applications/Sileo.app"
          }
        ],
        "repositories": [
          {
            "Types": "deb",
            "URIs": "https://repo.palera.in",
            "Suites": "./",
            "Components": ""
          }
        ]
      },
      "rootless": {
        "dotfile": "/var/jb/.procursus_strapped",
        "bootstraps": [
          {
            "cfver": 1800,
            "uri": "https://static.palera.in/bootstraps/1800/bootstrap-iphoneos-arm64.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/1800/libkrw0-tfp0_1.1.1_iphoneos-arm64.deb"
            ]
          },
          {
            "cfver": 1900,
            "uri": "https://static.palera.in/bootstraps/1900/bootstrap-iphoneos-arm64.tar.zst",
            "bootstrap-debs": [
              "https://static.palera.in/bootstraps/1900/libkrw0-tfp0_1.1.1_iphoneos-arm64.deb"
            ]
          }
        ],
        "managers": [
          {
            "name": "Sileo",
            "uri": "https://static.palera.in/rootless/sileo.deb",
            "icon": "https://palera.in/assets-config/sileo.png",
            "filePath": "/var/jb/Applications/Sileo.app"
          },
          {
            "name": "Zebra",
            "uri": "https://static.palera.in/rootless/zebra.deb",
            "icon": "https://palera.in/assets-config/zeeb.png",
            "filePath": "/var/jb/Applications/Zebra.app"
          }
        ],
        "repositories": [
          {
            "Types": "deb",
            "URIs": "https://repo.palera.in",
            "Suites": "./",
            "Components": ""
          },
          {
            "Types": "deb",
            "URIs": "https://ellekit.space",
            "Suites": "./",
            "Components": ""
          }
        ]
      }
    }
  ]
}

End.