From f3641ce869b83eda6deb863a598dddb3d1700988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Tue, 10 Nov 2026 16:28:33 +0100 Subject: [PATCH] tss: Copy Ap,OSEnvironment from the build identity into AP requests cloudOS build identities carry Ap,OSEnvironment (0x06, trusted darwinOS). Apple's restore host sends it in the AP TSS request; iBoot reads the value back from the ticket and applies the matching /osenvironments overlay of the device tree. Without it the restored device boots in the default environment, where cryptexes and Restricted Execution Mode are unavailable. Identities without the tag (every iOS one) are unaffected. --- src/tss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tss.c b/src/tss.c index 5bae1d2..93a5857 100644 --- a/src/tss.c +++ b/src/tss.c @@ -195,6 +195,7 @@ int tss_parameters_add_from_manifest(plist_t parameters, plist_t build_identity, return -1; } + plist_dict_copy_uint(parameters, build_identity, "Ap,OSEnvironment", NULL); plist_dict_copy_string(parameters, build_identity, "Ap,OSLongVersion", NULL); plist_dict_copy_string(parameters, build_identity, "Ap,OSReleaseType", NULL); plist_dict_copy_string(parameters, build_identity, "Ap,ProductMarketingVersion", NULL); @@ -338,6 +339,7 @@ int tss_request_add_ap_img4_tags(plist_t request, plist_t parameters) return -1; } + plist_dict_copy_uint(request, parameters, "Ap,OSEnvironment", NULL); plist_dict_copy_string(request, parameters, "Ap,OSLongVersion", NULL); plist_dict_copy_string(request, parameters, "Ap,OSReleaseType", NULL); plist_dict_copy_string(request, parameters, "Ap,ProductMarketingVersion", NULL);