diff --git a/AltDaemon/AltDaemon.entitlements b/AltDaemon/AltDaemon.entitlements old mode 100644 new mode 100755 diff --git a/AltDaemon/AnisetteDataManager.swift b/AltDaemon/AnisetteDataManager.swift old mode 100644 new mode 100755 diff --git a/AltDaemon/README.md b/AltDaemon/README.md index ff5f6e1..76960bd 100644 --- a/AltDaemon/README.md +++ b/AltDaemon/README.md @@ -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 @@ -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 + `= 1.2) Description: Reliable rootless AltDaemon with current Apple login compatibility. @@ -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 diff --git a/AltDaemon/package/roothide/DEBIAN/postinst b/AltDaemon/package/roothide/DEBIAN/postinst new file mode 100644 index 0000000..9efc233 --- /dev/null +++ b/AltDaemon/package/roothide/DEBIAN/postinst @@ -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|/usr/bin/AltDaemon|$JBROOT/usr/bin/AltDaemon|" "$PLIST" + +launchctl bootout system "$PLIST" >/dev/null 2>&1 || true +launchctl bootstrap system "$PLIST" +launchctl kickstart -k user/foreground/com.rileytestut.altdaemon diff --git a/AltDaemon/package/roothide/DEBIAN/preinst b/AltDaemon/package/roothide/DEBIAN/preinst new file mode 100644 index 0000000..a4bdfc0 --- /dev/null +++ b/AltDaemon/package/roothide/DEBIAN/preinst @@ -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 diff --git a/AltDaemon/package/roothide/DEBIAN/prerm b/AltDaemon/package/roothide/DEBIAN/prerm new file mode 100644 index 0000000..a4bdfc0 --- /dev/null +++ b/AltDaemon/package/roothide/DEBIAN/prerm @@ -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 diff --git a/Compatibility/AltStoreAuthCompat/Tweak.m b/Compatibility/AltStoreAuthCompat/Tweak.m old mode 100644 new mode 100755 index 8d7b921..48f0f6d --- a/Compatibility/AltStoreAuthCompat/Tweak.m +++ b/Compatibility/AltStoreAuthCompat/Tweak.m @@ -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 @" " +#define AAM_DEV_CLIENT_INFO @" " #if AAM_IDENTITY == 1 -#define AAM_CLIENT_INFO @" " +#define AAM_CLIENT_INFO @" " #else -#define AAM_CLIENT_INFO @" " +#define AAM_CLIENT_INFO @" " #endif // The User-Agent AltSign sends (unmodified). It contains com.apple.dt.Xcode/26.0 and @@ -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:@" [!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. diff --git a/RELEASE_NOTES_1.2.3.md b/RELEASE_NOTES_1.2.3.md new file mode 100644 index 0000000..b42c29c --- /dev/null +++ b/RELEASE_NOTES_1.2.3.md @@ -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 `_iphoneos-arm64.deb` | Dopamine rootless | +| `com.ichitaso.altdaemon__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. diff --git a/Repo/control b/Repo/control index 71ee32b..7723a4b 100644 --- a/Repo/control +++ b/Repo/control @@ -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. diff --git a/scripts/build-repo-debs.sh b/scripts/build-repo-debs.sh new file mode 100755 index 0000000..866b649 --- /dev/null +++ b/scripts/build-repo-debs.sh @@ -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 diff --git a/scripts/build-roothide-deb.sh b/scripts/build-roothide-deb.sh new file mode 100755 index 0000000..c3eb476 --- /dev/null +++ b/scripts/build-roothide-deb.sh @@ -0,0 +1,89 @@ +#!/bin/sh + +set -eu + +if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then + echo "usage: $0 [output.deb]" >&2 + exit 64 +fi + +ALTDAEMON_REPOSITORY_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +ALTDAEMON_ROOTLESS_PACKAGE="$ALTDAEMON_REPOSITORY_ROOT/AltDaemon/package" +ALTDAEMON_ROOTHIDE_PACKAGE="$ALTDAEMON_REPOSITORY_ROOT/AltDaemon/package/roothide" +ALTDAEMON_VERSION=$(sed -n 's/^Version: //p' "$ALTDAEMON_ROOTLESS_PACKAGE/DEBIAN/control") +ALTDAEMON_INPUT_BINARY=$1 +ALTDAEMON_DEB_OUTPUT=${2:-"$ALTDAEMON_REPOSITORY_ROOT/AltDaemonModern_${ALTDAEMON_VERSION}_iphoneos-arm64e.deb"} +ALTDAEMON_LDID_TOOL=${ALTDAEMON_LDID_TOOL:-ldid} +ALTDAEMON_DPKG_DEB_TOOL=${ALTDAEMON_DPKG_DEB_TOOL:-dpkg-deb} +ALTDAEMON_PACKAGE_STAGE=$(mktemp -d "${TMPDIR:-/tmp}/altdaemon-modern-roothide.XXXXXX") +ALTDAEMON_COMPAT_BUILD_DIR=$(mktemp -d "${TMPDIR:-/tmp}/altdaemon-modern-compat.XXXXXX") +ALTDAEMON_AUTH_COMPAT_BINARY=${ALTDAEMON_AUTH_COMPAT_BINARY:-"$ALTDAEMON_COMPAT_BUILD_DIR/AltStoreAuthCompat.dylib"} + +cleanup() +{ + rm -rf -- "$ALTDAEMON_PACKAGE_STAGE" "$ALTDAEMON_COMPAT_BUILD_DIR" +} +trap cleanup EXIT HUP INT TERM + +test -f "$ALTDAEMON_INPUT_BINARY" +command -v "$ALTDAEMON_LDID_TOOL" >/dev/null +command -v "$ALTDAEMON_DPKG_DEB_TOOL" >/dev/null + +if [ ! -f "$ALTDAEMON_AUTH_COMPAT_BINARY" ]; then + "$ALTDAEMON_REPOSITORY_ROOT/scripts/build-altstore-auth-compat.sh" "$ALTDAEMON_AUTH_COMPAT_BINARY" +fi + +# roothide installs into a randomized jbroot, so files are staged relative to it (no /var/jb). +mkdir -p \ + "$ALTDAEMON_PACKAGE_STAGE/DEBIAN" \ + "$ALTDAEMON_PACKAGE_STAGE/usr/bin" \ + "$ALTDAEMON_PACKAGE_STAGE/Library/LaunchDaemons" \ + "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries" \ + "$ALTDAEMON_PACKAGE_STAGE/usr/share/doc/altdaemonmodern" + +chmod 0755 "$ALTDAEMON_PACKAGE_STAGE" + +sed \ + -e 's/^Architecture: .*/Architecture: iphoneos-arm64e/' \ + -e 's/^Description: Reliable rootless AltDaemon/Description: Reliable RootHide AltDaemon/' \ + -e 's/This fork targets standard Dopamine rootless jailbreaks\./This build targets RootHide jailbreaks./' \ + "$ALTDAEMON_ROOTLESS_PACKAGE/DEBIAN/control" > "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/control" +sed 's|/var/jb/|/|g' \ + "$ALTDAEMON_ROOTLESS_PACKAGE/var/jb/Library/LaunchDaemons/com.rileytestut.altdaemon.plist" \ + > "$ALTDAEMON_PACKAGE_STAGE/Library/LaunchDaemons/com.rileytestut.altdaemon.plist" + +cp "$ALTDAEMON_ROOTHIDE_PACKAGE/DEBIAN/preinst" "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/preinst" +cp "$ALTDAEMON_ROOTHIDE_PACKAGE/DEBIAN/postinst" "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/postinst" +cp "$ALTDAEMON_ROOTHIDE_PACKAGE/DEBIAN/prerm" "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/prerm" +cp "$ALTDAEMON_INPUT_BINARY" "$ALTDAEMON_PACKAGE_STAGE/usr/bin/AltDaemon" +cp "$ALTDAEMON_AUTH_COMPAT_BINARY" "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries/AltStoreAuthCompat.dylib" +cp "$ALTDAEMON_REPOSITORY_ROOT/Compatibility/AltStoreAuthCompat/AltStoreAuthCompat.plist" "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries/AltStoreAuthCompat.plist" +cp "$ALTDAEMON_REPOSITORY_ROOT/LICENSE" "$ALTDAEMON_PACKAGE_STAGE/usr/share/doc/altdaemonmodern/AGPL-3.0.txt" +cp "$ALTDAEMON_REPOSITORY_ROOT/AltDaemon/NOTICE.md" "$ALTDAEMON_PACKAGE_STAGE/usr/share/doc/altdaemonmodern/NOTICE.md" + +chmod 0755 "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/preinst" "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/postinst" "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/prerm" +chmod 0755 "$ALTDAEMON_PACKAGE_STAGE/usr/bin/AltDaemon" +chmod 0755 "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries/AltStoreAuthCompat.dylib" +chmod 0644 \ + "$ALTDAEMON_PACKAGE_STAGE/DEBIAN/control" \ + "$ALTDAEMON_PACKAGE_STAGE/Library/LaunchDaemons/com.rileytestut.altdaemon.plist" \ + "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries/AltStoreAuthCompat.plist" \ + "$ALTDAEMON_PACKAGE_STAGE/usr/share/doc/altdaemonmodern/AGPL-3.0.txt" \ + "$ALTDAEMON_PACKAGE_STAGE/usr/share/doc/altdaemonmodern/NOTICE.md" + +# roothide sandboxes the daemon otherwise, which blocks the peer check on AltStore's connection. +ALTDAEMON_ENTITLEMENTS="$ALTDAEMON_COMPAT_BUILD_DIR/AltDaemon-roothide.entitlements" +cp "$ALTDAEMON_REPOSITORY_ROOT/AltDaemon/AltDaemon.entitlements" "$ALTDAEMON_ENTITLEMENTS" +for ALTDAEMON_ENTITLEMENT in \ + com.apple.private.security.no-sandbox \ + com.apple.private.security.storage.AppBundles \ + com.apple.private.security.storage.AppDataContainers +do + /usr/libexec/PlistBuddy -c "Add :$ALTDAEMON_ENTITLEMENT bool true" "$ALTDAEMON_ENTITLEMENTS" +done + +"$ALTDAEMON_LDID_TOOL" -S"$ALTDAEMON_ENTITLEMENTS" "$ALTDAEMON_PACKAGE_STAGE/usr/bin/AltDaemon" +"$ALTDAEMON_LDID_TOOL" -S "$ALTDAEMON_PACKAGE_STAGE/Library/MobileSubstrate/DynamicLibraries/AltStoreAuthCompat.dylib" +"$ALTDAEMON_DPKG_DEB_TOOL" --build --root-owner-group "$ALTDAEMON_PACKAGE_STAGE" "$ALTDAEMON_DEB_OUTPUT" + +echo "Built roothide package: $ALTDAEMON_DEB_OUTPUT" diff --git a/scripts/build-rootless-deb.sh b/scripts/build-rootless-deb.sh index 40b45b7..caee6ef 100755 --- a/scripts/build-rootless-deb.sh +++ b/scripts/build-rootless-deb.sh @@ -9,7 +9,7 @@ fi ALTDAEMON_REPOSITORY_ROOT=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) ALTDAEMON_INPUT_BINARY=$1 -ALTDAEMON_DEB_OUTPUT=${2:-"$ALTDAEMON_REPOSITORY_ROOT/AltDaemonModern_1.2.2_iphoneos-arm64.deb"} +ALTDAEMON_DEB_OUTPUT=${2:-"$ALTDAEMON_REPOSITORY_ROOT/AltDaemonModern_1.2.3_iphoneos-arm64.deb"} ALTDAEMON_LDID_TOOL=${ALTDAEMON_LDID_TOOL:-ldid} ALTDAEMON_DPKG_DEB_TOOL=${ALTDAEMON_DPKG_DEB_TOOL:-dpkg-deb} ALTDAEMON_PACKAGE_STAGE=$(mktemp -d "${TMPDIR:-/tmp}/altdaemon-modern-package.XXXXXX")