Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified AltDaemon/AltDaemon.entitlements
100644 → 100755
Empty file.
Empty file modified AltDaemon/AnisetteDataManager.swift
100644 → 100755
Empty file.
22 changes: 16 additions & 6 deletions AltDaemon/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# AltDaemonModern

This fork repairs AltDaemon for rootless jailbreaks. Version 1.2.2 tries on-device AuthKit anisette first and retains the anisette v3 client as fallback. It preserves AltStore's existing XPC protocol, so compatible AltStore Classic builds do not need a protocol change.
This fork repairs AltDaemon for rootless and Dopamine RootHide jailbreaks. Version 1.2.3 tries on-device AuthKit anisette first and retains the anisette v3 client as fallback. It preserves AltStore's existing XPC protocol, so compatible AltStore Classic builds do not need a protocol change.

Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the on-device anisette and authentication/retry fixes in 1.2.2. See the [release notes](../RELEASE_NOTES_1.2.2.md) for validation details.
Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the on-device anisette and authentication/retry fixes in 1.2.2, and the HTTP 503 fix and RootHide package in 1.2.3. See the [release notes](../RELEASE_NOTES_1.2.3.md) for validation details.

## What changed

Expand All @@ -15,8 +15,10 @@ Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the on-dev
- Retries only transient `get_headers` failures with a short bounded backoff.
- In v3 mode, automatically fails over between three HTTPS SideStore anisette endpoints and
remembers the last endpoint that succeeded.
- Applies the 1.2.2 compatibility client-info headers to both GSA authentication
and developer-services requests.
- Applies the compatibility client-info headers to both GSA authentication
and developer-services requests. Since 2026-11-20 Apple's GSA edge answers
HTTP 503 when the OS name is `macOS;`, so 1.2.3 sends `Mac OS X;` and rewrites
`<macOS;` in any other GSA request.
- Includes an AltStore-only compatibility module for Classic 2.2.1 that updates
its obsolete GSA authentication identity to `com.apple.akd`, retries transient
Apple HTTP 429/5xx responses with bounded backoff, and reports an accurate
Expand All @@ -36,7 +38,7 @@ Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the on-dev
communication failures.
- Includes daemon-specific target fixes needed to build current upstream source.

The minimum deployment target is iOS 15.0. The primary target is Dopamine's standard rootless environment; RootHide is not currently supported.
The minimum deployment target is iOS 15.0. Supported environments are Dopamine's standard rootless environment and Dopamine RootHide. The legacy RootHide Bootstrap is not tested.

## Build

Expand Down Expand Up @@ -64,6 +66,14 @@ scripts/build-rootless-deb.sh /path/to/AltDaemon /path/to/AltDaemonModern.deb

The package builder stages files under `/var/jb`, signs a private copy of the input binary, and includes the AGPL and third-party notices. It never changes the input binary.

To build a Dopamine RootHide package from the same binary:

```sh
scripts/build-roothide-deb.sh /path/to/AltDaemon /path/to/AltDaemonModern.deb
```

The RootHide package uses architecture `iphoneos-arm64e` and stages files relative to the jbroot instead of `/var/jb`. Because the jbroot path is randomized, `postinst` resolves it with `jbroot /` and writes the absolute daemon path into the LaunchDaemon plist before bootstrapping it. The daemon is also signed with `com.apple.private.security.no-sandbox` and the RootHide storage entitlements; without them RootHide sandboxes AltDaemon, the peer check on AltStore's connection is denied, and AltStore reports that AltServer could not be found. The version is read from the rootless `control`, so both packages stay in step.

## Configuration

By default, the daemon tries on-device AuthKit first. If that path fails, the
Expand Down Expand Up @@ -116,6 +126,6 @@ Do not add raw header logging. `X-Apple-I-MD`, `X-Apple-I-MD-M`, and `adi.pb` mu

## Installation

The build product is unsigned. A rootless installation must be signed with the entitlements in `AltDaemon.entitlements`, installed as `/var/jb/usr/bin/AltDaemon`, and bootstrapped with the rootless plist at `AltDaemon/package/var/jb/Library/LaunchDaemons/com.rileytestut.altdaemon.plist`. Back up an existing executable and validate a separately named, signed copy with `--self-test-anisette` before replacing anything. Version 1.2.2 includes the private AuthKit client entitlement for the on-device path.
The build product is unsigned. A rootless installation must be signed with the entitlements in `AltDaemon.entitlements`, installed as `/var/jb/usr/bin/AltDaemon`, and bootstrapped with the rootless plist at `AltDaemon/package/var/jb/Library/LaunchDaemons/com.rileytestut.altdaemon.plist`. Back up an existing executable and validate a separately named, signed copy with `--self-test-anisette` before replacing anything. The private AuthKit client entitlement for the on-device path is included since 1.2.2.

The standard build script does not create a `.deb` or modify a connected device. Packaging and installation are separate, explicit steps.
5 changes: 4 additions & 1 deletion AltDaemon/package/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.rileytestut.altdaemon
Name: AltDaemon Modern
Version: 1.2.2
Version: 1.2.3
Architecture: iphoneos-arm64
Depends: ellekit (>= 1.2)
Description: Reliable rootless AltDaemon with current Apple login compatibility.
Expand All @@ -10,3 +10,6 @@ Maintainer: AltDaemonModern contributors
Author: Riley Testut and AltDaemonModern contributors
Homepage: https://github.com/altstoreio/AltStore
Section: Tweaks
Depiction: https://cydia.ichitaso.com/depiction/altdaemon.html
SileoDepiction: https://cydia.ichitaso.com/depiction/altdaemon.json
Icon: https://raw.githubusercontent.com/ichitaso/AltDaemonModern/refs/heads/main/Repo/Icon-60%403x.png
13 changes: 13 additions & 0 deletions AltDaemon/package/roothide/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
set -e

PLIST=/Library/LaunchDaemons/com.rileytestut.altdaemon.plist
JBROOT=$(jbroot /)
JBROOT=${JBROOT%/}

# The jbroot path is randomized, so launchd needs the resolved absolute binary path.
sed -i "s|<string>/usr/bin/AltDaemon</string>|<string>$JBROOT/usr/bin/AltDaemon</string>|" "$PLIST"

launchctl bootout system "$PLIST" >/dev/null 2>&1 || true
launchctl bootstrap system "$PLIST"
launchctl kickstart -k user/foreground/com.rileytestut.altdaemon
5 changes: 5 additions & 0 deletions AltDaemon/package/roothide/DEBIAN/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e

launchctl bootout system/com.rileytestut.altdaemon >/dev/null 2>&1 || true
launchctl bootout user/foreground/com.rileytestut.altdaemon >/dev/null 2>&1 || true
5 changes: 5 additions & 0 deletions AltDaemon/package/roothide/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e

launchctl bootout system/com.rileytestut.altdaemon >/dev/null 2>&1 || true
launchctl bootout user/foreground/com.rileytestut.altdaemon >/dev/null 2>&1 || true
17 changes: 13 additions & 4 deletions Compatibility/AltStoreAuthCompat/Tweak.m
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
// "session expired" (AltStore error 1100).
// 1: apply the override (working configuration). 0: leave AltSign's value untouched.
#define AAM_DEV_IDENTITY 1
#define AAM_DEV_CLIENT_INFO @"<Mac15,7> <macOS;15.7.9;24G830> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"
#define AAM_DEV_CLIENT_INFO @"<Mac15,7> <Mac OS X;15.7.9;24G830> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"

#if AAM_IDENTITY == 1
#define AAM_CLIENT_INFO @"<MacBookPro13,2> <macOS;13.1;22C65> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"
#define AAM_CLIENT_INFO @"<MacBookPro13,2> <Mac OS X;13.1;22C65> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"
#else
#define AAM_CLIENT_INFO @"<Mac15,7> <macOS;15.7.9;24G830> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"
#define AAM_CLIENT_INFO @"<Mac15,7> <Mac OS X;15.7.9;24G830> <com.apple.AuthKit/1 (com.apple.akd/1.0)>"
#endif

// The User-Agent AltSign sends (unmodified). It contains com.apple.dt.Xcode/26.0 and
Expand Down Expand Up @@ -316,6 +316,15 @@ static BOOL AAMIsDeveloperServicesRequest(NSURLRequest *request)

if (!AAMIsAppleAuthenticationRequest(request))
{
// Since 2026-11-20 the GSA edge answers 503 when client info contains "macOS;".
NSString *clientInfo = [request valueForHTTPHeaderField:@"X-MMe-Client-Info"];
if ([request.URL.host.lowercaseString isEqualToString:@"gsa.apple.com"] && [clientInfo containsString:@"<macOS;"])
{
NSMutableURLRequest *gsaRequest = [request mutableCopy];
[gsaRequest setValue:[clientInfo stringByReplacingOccurrencesOfString:@"<macOS;" withString:@"<Mac OS X;"]
forHTTPHeaderField:@"X-MMe-Client-Info"];
return AAMOriginalDataTaskImplementation(object, selector, gsaRequest, completionHandler);
}
return AAMOriginalDataTaskImplementation(object, selector, request, completionHandler);
}

Expand Down Expand Up @@ -364,7 +373,7 @@ static void AAMInitialize(void)
method_setImplementation(class_getInstanceMethod(sessionClass, selector), (IMP)AAMDataTaskWithRequest);
}

AAMAppendDiagnostic([NSString stringWithFormat:@"loaded build=native-final in %@ sessionClass=%@",
AAMAppendDiagnostic([NSString stringWithFormat:@"loaded build=native-macosx in %@ sessionClass=%@",
NSBundle.mainBundle.bundleIdentifier ?: @"(unknown)",
NSStringFromClass(sessionClass)]);
[probeSession invalidateAndCancel];
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# AltStore

> [!IMPORTANT]
> This fork contains **AltDaemonModern**, a source-level repair for rootless jailbreaks with on-device AuthKit anisette and anisette v3 fallback. See the [AltDaemonModern documentation](AltDaemon/README.md) for scope, build instructions, security notes, and device-testing guidance. The installed daemon is never modified by the build scripts.
> This fork contains **AltDaemonModern**, a source-level repair for rootless and RootHide jailbreaks with on-device AuthKit anisette and anisette v3 fallback. See the [AltDaemonModern documentation](AltDaemon/README.md) for scope, build instructions, security notes, and device-testing guidance. The installed daemon is never modified by the build scripts.

**[AltDaemon Modern 1.2.2](https://github.com/emp0ry/AltDaemonModern/releases/tag/v1.2.2)** addresses Apple authentication error `-80045` and an AltStore authentication-retry crash. Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the 1.2.2 fixes. See the [release notes](RELEASE_NOTES_1.2.2.md) for details and the tested configuration.
**[AltDaemon Modern 1.2.3](https://github.com/emp0ry/AltDaemonModern/releases/tag/v1.2.3)** fixes the HTTP 503 that Apple began returning on 2026-11-20 for AltStore sign-in and refresh, and adds a Dopamine RootHide package. See the [release notes](RELEASE_NOTES_1.2.3.md) for details and the tested configurations.

> AltStore is an alternative app store for non-jailbroken iOS devices.

Expand Down
30 changes: 30 additions & 0 deletions RELEASE_NOTES_1.2.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AltDaemon Modern 1.2.3

## Changes

- Fixes the HTTP 503 that Apple's authentication server began returning on 2026-11-20 for AltStore sign-in, refresh, and installation. Apple's GSA edge now rejects `X-MMe-Client-Info` values whose OS name is `macOS;`. The AltStore compatibility module now sends `Mac OS X;`, and rewrites `<macOS;` in any other GSA request, such as values supplied by an anisette v3 server.
- Adds a Dopamine RootHide package, `AltDaemonModern_1.2.3_iphoneos-arm64e.deb`, built with the new `scripts/build-roothide-deb.sh`.
- Files are staged relative to the jbroot instead of `/var/jb`.
- `postinst` resolves the randomized jbroot with `jbroot /` and writes the absolute daemon path into the LaunchDaemon plist before bootstrapping it.
- AltDaemon is signed with `com.apple.private.security.no-sandbox` and the RootHide storage entitlements. Without them RootHide sandboxes the daemon, which denies the peer check on AltStore's connection and makes AltStore report that AltServer could not be found.
- The AltDaemon binary is unchanged from 1.2.2. Only the compatibility module and packaging changed.

## Tested configurations

- iPad (7th generation), iPadOS 18.3.2, Dopamine rootless: before the fix, every `GsService2` request returned a 190-byte HTML 503. With 1.2.3 the requests returned `hsc=200` with `ec=0`, and Refresh All succeeded.
- iPhone 11 Pro, iOS 26.0.1, Dopamine RootHide: the package installed and upgraded cleanly, the daemon started with both Mach services active, and Refresh All succeeded.

This does not guarantee success on every account, iOS version, or future Apple server change. The legacy RootHide Bootstrap was not tested.

## Installation

- Dopamine rootless: install `AltDaemonModern_1.2.3_iphoneos-arm64.deb` over the existing package.
- Dopamine RootHide: install `AltDaemonModern_1.2.3_iphoneos-arm64e.deb`.

Then fully close and reopen AltStore before trying Refresh All. Do not reset anisette state or sign out of Apple ID as a routine update step.

## Credits

Thanks to [ichitaso](https://github.com/ichitaso/AltDaemonModern) for the 503 fix and the RootHide package, and to the LiveContainer and SideStore communities for isolating the `macOS;` client-info change.

Thanks also to Riley Testut, AltStore, SideStore, and the other contributors. AltDaemon Modern remains open source under AGPL-3.0.
34 changes: 34 additions & 0 deletions Repo/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Repository packages

`scripts/build-repo-debs.sh` builds the rootless and RootHide packages for the repository into this directory in one step.

## Requirements

- macOS with Xcode
- `ldid` and `dpkg-deb`

## Build

Run from the repository root:

```sh
# Reuse the AltDaemon binary from an existing package (when the daemon source is unchanged)
scripts/build-repo-debs.sh Repo/com.ichitaso.altdaemon_1.2.2_iphoneos-arm64.deb

# Use an AltDaemon binary you built
scripts/build-repo-debs.sh /path/to/AltDaemon

# Build AltDaemon first with scripts/build-altdaemon.sh
scripts/build-repo-debs.sh
```

## Output

| File | Jailbreak |
| --- | --- |
| `com.ichitaso.altdaemon_<version>_iphoneos-arm64.deb` | Dopamine rootless |
| `com.ichitaso.altdaemon_<version>_iphoneos-arm64e.deb` | Dopamine RootHide |

The version is read from `AltDaemon/package/DEBIAN/control`. To release a new version, update it there and in `Repo/control`, then run the script.

Both packages contain the same `AltStoreAuthCompat.dylib`. Only the RootHide package signs AltDaemon with the no-sandbox and storage entitlements. `.deb` files are ignored by git.
2 changes: 1 addition & 1 deletion Repo/control
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: com.rileytestut.altdaemon
Name: AltDaemon Modern
Version: 1.2.2
Version: 1.2.3
Architecture: iphoneos-arm64
Depends: ellekit (>= 1.2)
Description: Reliable rootless AltDaemon with current Apple login compatibility.
Expand Down
57 changes: 57 additions & 0 deletions scripts/build-repo-debs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/bin/sh

set -eu

if [ "$#" -gt 1 ]; then
echo "usage: $0 [AltDaemon binary | existing AltDaemon .deb]" >&2
echo "Without an argument, AltDaemon is built with scripts/build-altdaemon.sh." >&2
exit 64
fi

ALTDAEMON_REPOSITORY_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
ALTDAEMON_REPO_DIR="$ALTDAEMON_REPOSITORY_ROOT/Repo"
ALTDAEMON_VERSION=$(sed -n 's/^Version: //p' "$ALTDAEMON_REPOSITORY_ROOT/AltDaemon/package/DEBIAN/control")
ALTDAEMON_WORK_DIR=$(mktemp -d "${TMPDIR:-/tmp}/altdaemon-modern-repo.XXXXXX")

cleanup()
{
rm -rf -- "$ALTDAEMON_WORK_DIR"
}
trap cleanup EXIT HUP INT TERM

if [ "$#" -eq 0 ]; then
"$ALTDAEMON_REPOSITORY_ROOT/scripts/build-altdaemon.sh"
ALTDAEMON_BINARY="${ALTDAEMON_DERIVED_DATA_DIR:-${TMPDIR:-/tmp}/AltDaemonModernDerivedData}/Build/Products/Release-iphoneos/AltDaemon"
else
case "$1" in
*.deb)
dpkg-deb -x "$1" "$ALTDAEMON_WORK_DIR/source"
ALTDAEMON_BINARY=$(find "$ALTDAEMON_WORK_DIR/source" -path '*/usr/bin/AltDaemon' -type f | head -n 1)
;;
*)
ALTDAEMON_BINARY=$1
;;
esac
fi

if [ -z "$ALTDAEMON_BINARY" ] || [ ! -f "$ALTDAEMON_BINARY" ]; then
echo "error: AltDaemon binary not found" >&2
exit 1
fi

# Build the compatibility module once so both packages ship the same dylib.
export ALTDAEMON_AUTH_COMPAT_BINARY="$ALTDAEMON_WORK_DIR/AltStoreAuthCompat.dylib"
"$ALTDAEMON_REPOSITORY_ROOT/scripts/build-altstore-auth-compat.sh" "$ALTDAEMON_AUTH_COMPAT_BINARY"

ALTDAEMON_ROOTLESS_DEB="$ALTDAEMON_REPO_DIR/com.ichitaso.altdaemon_${ALTDAEMON_VERSION}_iphoneos-arm64.deb"
ALTDAEMON_ROOTHIDE_DEB="$ALTDAEMON_REPO_DIR/com.ichitaso.altdaemon_${ALTDAEMON_VERSION}_iphoneos-arm64e.deb"

"$ALTDAEMON_REPOSITORY_ROOT/scripts/build-rootless-deb.sh" "$ALTDAEMON_BINARY" "$ALTDAEMON_ROOTLESS_DEB"
"$ALTDAEMON_REPOSITORY_ROOT/scripts/build-roothide-deb.sh" "$ALTDAEMON_BINARY" "$ALTDAEMON_ROOTHIDE_DEB"

echo
echo "Repo packages ($ALTDAEMON_VERSION):"
for ALTDAEMON_DEB in "$ALTDAEMON_ROOTLESS_DEB" "$ALTDAEMON_ROOTHIDE_DEB"
do
echo " $(basename -- "$ALTDAEMON_DEB") $(dpkg-deb -f "$ALTDAEMON_DEB" Architecture)"
done
Loading
Loading