Skip to content

Apple's open-source XNU kernel on Android phones: its own loader and drivers, Metal on the Adreno. Runs from RAM; a reboot gives the phone back to Android.

C

The parsed page goes straight back into JetEngine, and the app has waits of its own left

vcvkk324708f7ab1b
diff --git a/README.md b/README.md
index bb9f9ff..71f70e7 100644
--- a/README.md
+++ b/README.md
@@ -1949,7 +1949,22 @@ redwood: appstored: KEY brotli entered 0 returned 0, processStream entered 0 ret
`appstored`, где всё уже работает, — значит, это зацепка, а не ответ.
Остаётся само рисование: 177 786 байт приходят, `JPReader` разбирает их в результат, и ничего не
-появляется. Следующий вопрос — что с этим результатом происходит дальше.
+появляется. Кто берёт результат дальше — видно по кадрам стека на выходе из `processStream:`
+(`ipsw dyld a2s` называет хотя бы образ): **обратно в JetEngine**,
+`/System/Library/PrivateFrameworks/JetEngine.framework/JetEngine`, в функции Swift, имён которых в кеше
+нет. Отсюда и продолжать, и это работа статическая — по той же проторённой дорожке с Ghidra.
+
+Две вещи туда же. В приложении свой граф промисов, и он **не весь исполнен**: 192 промиса, и два потока
+стоят каждый на двух, которых никто не исполняет, — один в
+`-[ACAccountStore _updateStorefrontInLocalAccount:]`, другой в
+`ams_addCookiesForAccount:clientInfo:bag:cleanupGlobalCookies:` внутри
+`-[AMSURLRequestEncoder requestByEncodingRequest:parameters:]`: та же семья, что и тупик в `appstored`,
+и осталась она потому, что снявший тот тупик перехват отвечает только на
+`_ams_localiTunesAccountAfterUpdatingStorefront:`. `-[AMSBagValue valueWithError:]` — 92 входа и 91
+выход: один поток приложения ждёт значения из мешка прямо в момент отчёта.
+
+И SwiftUI тут ни при чём: виджеты «Погода» и «Календарь» на домашнем экране — это WidgetKit, то есть
+SwiftUI, и своё содержимое они на этом телефоне рисуют. Значит, мешает что-то своё именно этому пути.
Значит, работа всё-таки не в AMS: понять, почему `fairplayd.H2` выходит с `exit(0)` сразу, и удержать
его живым; подмена выше — опыт, показывающий, что это починит.
diff --git a/userland/src/inject_store.c b/userland/src/inject_store.c
index f63595b..cc4b189 100644
--- a/userland/src/inject_store.c
+++ b/userland/src/inject_store.c
@@ -394,7 +394,25 @@ dump_tasks(void)
* watched through __cxa_throw, whose type name is the second word of its std::type_info), and it is
* thrown in appstored as well, where everything now works -- so it is a lead, not an answer.
* WHAT IS LEFT is the drawing itself: 177 786 bytes arrive, JPReader parses them into a result, and
- * nothing appears. The next question is what becomes of that result.
+ * nothing appears. Whoever owns it next is on the stack when it is handed back, so the walk is done
+ * at the exit too, and "ipsw dyld a2s" names the image if not the function:
+ * JETPACK processStream: out, a result, error (none), to 0x19d96245c 0x19d963f88 0x19d9634bc ...
+ * 0x19d96245c: func_19d962020 + 1084
+ * dylib=/System/Library/PrivateFrameworks/JetEngine.framework/JetEngine
+ * -- straight back into JetEngine, into Swift functions the cache carries no names for. That is
+ * where the next session starts, and it is static work: the project's Ghidra path (see
+ * src/inject_fairplay.c for the tools and their rules).
+ * Two things to carry there. The app has its own promise graph and it is NOT all finished: 192
+ * promises, and two threads (2632, 2633 in one session) each parked on two that nobody fulfils --
+ * one in -[ACAccountStore _updateStorefrontInLocalAccount:], one in
+ * ams_addCookiesForAccount:clientInfo:bag:cleanupGlobalCookies: inside
+ * -[AMSURLRequestEncoder requestByEncodingRequest:parameters:] -- the same family as the deadlock
+ * named in appstored, still here because the hook that cut that one only answers
+ * _ams_localiTunesAccountAfterUpdatingStorefront:. -[AMSBagValue valueWithError:] stands at 92
+ * entered, 91 returned: one thread in the app is waiting for a bag value as the report is printed.
+ * And SwiftUI itself is not the suspect: the Weather and Calendar home-screen widgets are WidgetKit,
+ * which is SwiftUI, and they draw their own content on this phone. Whatever stops _JetEngine_SwiftUI
+ * is particular to this path.
*
* THE THREE SHAPES OF AN INSTRUMENT THAT LIES, all of them met on this branch, all of them making a
* thing that happened look like a thing that did not:
@@ -459,8 +477,15 @@ new_processStream(id self, SEL cmd, void *stream, void *verifier, void *options,
say("redwood: store: JETPACK processStream: in\n");
result = old_processStream(self, cmd, stream, verifier, options, error);
returned[COUNT_processStream]++;
- say("redwood: store: JETPACK processStream: out, %s, error %s\n", result != NULL ? "a result" : "(nil)",
- error != NULL && *error != NULL ? text_of(*error, one, sizeof(one)) : "(none)");
+ {
+ /* and who owns the result next: whoever is on the stack when it is handed back */
+ char frames[10 * 20 + 1] = "";
+
+ frames_from((uintptr_t)__builtin_frame_address(0), frames, sizeof(frames));
+ say("redwood: store: JETPACK processStream: out, %s, error %s, to%s\n",
+ result != NULL ? "a result" : "(nil)",
+ error != NULL && *error != NULL ? text_of(*error, one, sizeof(one)) : "(none)", frames);
+ }
return result;
}