Skip to content

Restores AltServer anisette generation on macOS 26+ - #1770

Open
jslay88 wants to merge 3 commits into
altstoreio:marketplacefrom
jslay88:anisette-virtual-machine
Open

jslay88 wants to merge 3 commits into
altstoreio:marketplacefrom
jslay88:anisette-virtual-machine

Conversation

@jslay88

@jslay88 jslay88 commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • macOS 26+ gates adid behind private entitlements, so AOSKit/AuthKit no longer return anisette data to AltServer (and the Mail plug-in path can crash when those headers are missing).
  • Adds an optional external anisette server (AnisetteServerURL / ALTSERVER_ANISETTE_SERVER) as an escape hatch.
  • On Apple silicon, falls back to generating anisette data in a bundled minimal Linux guest via Virtualization.framework (vsock + virtio-fs for ADI state), so no Docker or separate server is required.

Test plan

  • On macOS 26+/27 with no AnisetteServerURL set and Docker stopped, request anisette data from AltServer and confirm a valid machineID / OTP are returned
  • Confirm cold VM start succeeds and warm requests reuse the guest
  • Confirm the guest shuts down after idle timeout and restarts on the next request
  • Confirm first-launch ADI library download from the Apple Music APK populates Application Support when state is missing
  • With defaults write com.rileytestut.AltServer AnisetteServerURL http://127.0.0.1:6969, confirm the configured server is used instead of the VM
  • Install / refresh an app on a paired device end to end (expect a one-time Apple ID + 2FA prompt if the VM machine identity is new)

As of macOS 26, AuthKit omits the anisette headers unless the requesting
process is entitled to them, which left the Mail plug-in initializing
ALTAnisetteData with nil values for nonnull parameters and crashing
AltServer. Return nil instead so the request fails as a request.
macOS 26 gates adid behind private entitlements, so AOSKit returns an
empty header dictionary and AltServer can no longer generate anisette
data itself. Let an anisette server be configured as the source instead:

    defaults write com.rileytestut.AltServer AnisetteServerURL <url>

When set, the server is used as the source of truth rather than a
fallback, since mixing it with locally generated values yields a
machine ID and one-time password Apple won't accept together.
Apple's ADI libraries are the only remaining way to produce anisette
data, but they can't be loaded natively on Apple silicon: they're linked
for 4KB pages and place executable code and writable data in the same
page, which a 16KB-page kernel can't map without violating W^X.

Run them in a minimal Linux guest instead, where they work unmodified.
The guest provisions itself with Apple over NAT, keeps its ADI state on
a virtio-fs share so the machine identity survives restarts, and answers
the host over vsock rather than TCP so VPNs and NAT routing can't get
between them. It shuts down after five minutes idle and restarts on
demand; a cold start costs under two seconds.

The kernel and initramfs ship in the app bundle, and Apple's libraries
are extracted from the Apple Music Android package on first launch since
they can't be redistributed.

@qsfecdcdd qsfecdcdd left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@jslay88

jslay88 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Ok

Not really appropriate to approve PRs on repos for which you are not a maintainer of. You just create noise for those involved.

@qsfecdcdd

Copy link
Copy Markdown

So, why you can’t merged this request?

@jslay88

jslay88 commented Sep 4, 2026

Copy link
Copy Markdown
Author

Because I'm not the maintainer...

Please familiarize yourself with GitHub and community guidelines.

@cwon2

cwon2 commented Sep 6, 2026

Copy link
Copy Markdown

I prepared a focused follow-up for the stale X-MMe-Client-Info described in #1772: jslay88#2

It derives a coherent identity from the host Mac model/OS/build, uses Xcode client version 25183.54.10, and applies it consistently to VM/server, XPC, and Mail-plugin anisette paths. The AltServer Debug scheme builds successfully for macOS arm64; end-to-end Apple ID login is not yet verified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants