Skip to content

Install Xcode from Apple Encrypted Archive (.aea) files - #176

Merged
sebsto merged 1 commit into
mainfrom
feat/aea-support
Nov 19, 2026
Merged

sebsto merged 1 commit into
mainfrom
feat/aea-support

Conversation

@sebsto

@sebsto sebsto commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #174

Xcode 27.3 is also published as an .aea file. It uses the signature-only profile (hkdf_sha256_hmac__none__ecdsa_p256), so no key or password is needed. Inside is an LZMA Apple Archive holding Xcode-beta.app.

What changes

  • install accepts Xcode*.aea like Xcode*.xip: same steps, no extra prompt. The file picker lists .aea files and the version comes from the file name.
  • The archive carries its signing certificate chain in its auth data. The chain must pass the Security framework trust check and end at Apple Root CA - G3 (pinned by SHA-256). Only then is the leaf key used.
  • Verification and extraction run in one stream through Apple's AppleArchive framework, so there is no 10 GB temp file and no call to aea or aa. Extraction runs as a @concurrent function.
  • Like aa extract, extraction skips attributes only root may set (ignoreOperationNotPermitted). Without that, closing the stream fails with ioError.
  • Two new errors: archive not signed by Apple, and archive can not be expanded.

Tested

  • swift test: 224 tests pass. The new suite covers auth data parsing, the recorded Apple chain (date pinned, because the leaf expires 2027-11-03), a self-signed fake "Apple Root CA - G3", an expired date, and a test-built signed archive with the right and the wrong key.
  • Real Xcode 27.3 beta 2.aea (2,174,613,438 bytes), using the opt-in test (XCODEINSTALL_AEA_FILE + XCODEINSTALL_AEA_OUTPUT): verified and extracted in about 41 s, 167,541 entries, the same as aa list. xcodebuild -version reports Xcode 27.3 (27C5035i). codesign --verify --deep --strict passes, and spctl reports Apple System.
  • Not run: the full xcodeinstall install on this file (moving it to /Applications and running sudo installer). That part is shared with the .xip path.

Xcode 27.3 is also published as an .aea file. It is signed, not
encrypted. xcodeinstall now reads the certificate chain stored in the
archive, checks it ends at Apple Root CA - G3, and uses the leaf key to
verify and extract the archive with Apple's AppleArchive framework.
Installing an .aea works like a .xip, with no extra prompt.

Closes #174
@sebsto
sebsto merged commit a2a9ef7 into main Nov 19, 2026
2 checks passed
@sebsto
sebsto deleted the feat/aea-support branch November 19, 2026 12:54
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.

Add support for Apple Encrypted Archive (.aea) shipped with Xcode 27.3

1 participant