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 storefront has exactly two sources and both are already known to be shut

vcvkk01e2b567d076
diff --git a/README.md b/README.md
index ba129f4..b6226c6 100644
--- a/README.md
+++ b/README.md
@@ -1159,11 +1159,21 @@ keychain. Copying activation identity» → «Device is probably unactivated»).
```
Нет витрины (storefront) — нет «мешка» (bag, конфигурация Apple) — не загружается и главная страница.
-Storefront — это регион, и на настоящем устройстве он берётся либо из учётной записи, в которую вошли,
-либо из SIM через CoreTelephony. Единственное, чего `appstored` не находит при открытом магазине кроме
-этого, — `com.apple.commcenter.coretelephony.xpc`, то есть CommCenter, который здесь падает по кругу на
-двух отсутствующих драйверах IOKit. Так что пустой магазин и телефония — это одна и та же находка дважды.
-Входить в настоящую учётную запись Apple здесь нельзя, и это решение не наше.
+Storefront — это регион, и третьего пути к нему нет. Те две службы, которых `appstored` не находит при
+открытом магазине, и есть два способа, какими storefront попадает на устройство из коробки:
+`com.apple.commcenter.coretelephony.xpc` — страна из SIM через CommCenter, который здесь падает по кругу
+на двух отсутствующих драйверах IOKit, и `com.apple.mobileactivationd` — регион из записи активации
+(в этом двоичном файле есть `RegionCode`, `RegionInfo` и `subscriberCountryCodeDidChange:`), а она растёт
+из Secure Enclave, которого у этого телефона нет.
+Проверено и то, не в пропущенном ли ассистенте настройки дело — порт его отключает
+(`src/inject_sb.c` обнуляет `-[SBSetupManager _setSetupRequiredReason:]`). Не в нём: файл
+`com.apple.purplebuddy.plist` с `SetupDone = True` мы и так кладём, MobileGestalt и так отвечает
+`RegionInfo = LL/A`, а регион — это не storefront. Подсунуть storefront через страну тоже нельзя: все
+селекторы `countryCode` в AppleMediaServices достают страну **из** мешка (`_countryCodeFromBag:`), а мешок
+без storefront не запросить — `AMSBagNetworkTask` принимает его аргументом; в `AMSDefaults` лежит
+`storefrontSuffixes`, а не storefront. То есть подделать это файлом нельзя: нужен либо работающий
+CommCenter, либо вход в учётную запись, а входить в настоящую учётную запись Apple здесь нельзя, и это
+решение не наше.
**Телефония (`CommCenter`) — пробовали, не вышло.** Следующей по числу обращений была она: `com.apple.commcenter.xpc`
SpringBoard спрашивает десять тысяч раз за все сеансы. iOS держит два задания с одним и тем же именем и выбирает
diff --git a/userland/mkjobs.py b/userland/mkjobs.py
index 241eacb..9cdc847 100755
--- a/userland/mkjobs.py
+++ b/userland/mkjobs.py
@@ -72,9 +72,13 @@ import sys
# pick it. It then gets a long way: it answers com.apple.commcenter.xpc and .coretelephony.xpc (85 and 18
# failed lookups in a session become none), serves geod its policy, loads the network-extension
# configurations. And then it dies, every time, on one of two IOKit drivers of the cellular path that this
-# kernel has not got: "Could not find AppleIPAppender service" (matched by name, user client
-# ApplePDPHelperInterface -- PDP contexts, traffic-class flows, dedicated bearers) and SIGSEGV 50 ms later,
-# or "Unable to communicate with AppleBaseband driver" (com.apple.driver.AppleBasebandPCI) and SIGABRT.
+# kernel has not got, and each has its own signal. With CommCenter's own log on, the split is clean over
+# 20 crashes: 11 SIGSEGV every one of them right after "Could not find AppleIPAppender service" (matched
+# by name; user client ApplePDPHelperInterface -- PDP contexts, traffic-class flows, dedicated bearers),
+# and 9 SIGABRT every one of them right after "Unable to communicate with AppleBaseband driver"
+# (com.apple.driver.AppleBasebandPCI). That answers the obvious question before anyone spends a week on
+# it: stubbing AppleIPAppender alone would remove the SIGSEGV half and leave the SIGABRT half, so it is
+# not enough on its own -- and AppleBasebandPCI is an Apple modem on PCIe, which this phone has not got.
# It respawns and does it again: 18 crashes in a seven-minute session where the same image without it has
# none. The boot is not held up -- it reaches the same 118 processes against 119 -- so the trade is 103
# failed lookups a session against a process dying every fifteen seconds for ever, which is a bad one.
@@ -107,11 +111,22 @@ import sys
# localAccount = <ACAccount type = iTunesStore | username = local | storefront = (null)>
# [bag] AMSBagNetworkDataSource: Could not fetch initial cached storefront
# [Bag] Error creating snapshot of bag: Timed out while waiting for snapshot bag to load
-# No storefront -> no bag -> the front page never loads. A storefront is a region, and on a real device
-# it comes from the signed-in account or from the SIM through CoreTelephony; appstored's only other
-# failed lookup while the store is open is com.apple.commcenter.coretelephony.xpc, which is CommCenter,
-# which crash-loops here on two missing IOKit drivers. So the empty store and the telephony finding are
-# the same finding twice. Signing in is not an option that may be taken here.
+# No storefront -> no bag -> the front page never loads, and there is no third way to get one. The two
+# services appstored cannot find while the store is open ARE the two routes a stock iPhone has to a
+# storefront, and nothing else:
+# com.apple.commcenter.coretelephony.xpc -- the SIM's country, through CommCenter, which crash-loops
+# here (see above);
+# com.apple.mobileactivationd -- the activation record's region. That binary carries RegionCode,
+# RegionInfo and subscriberCountryCodeDidChange:, and it is rooted in a Secure Enclave this phone
+# has not got.
+# It was worth checking whether the setup assistant is the missing piece, since this port refuses it
+# (src/inject_sb.c forces -[SBSetupManager _setSetupRequiredReason:] to 0) -- it is not. We already ship
+# com.apple.purplebuddy.plist with SetupDone = True, MobileGestalt already answers RegionInfo = LL/A, and
+# a region is not a storefront. AMS has no country-to-storefront path to feed either: every countryCode
+# selector in AppleMediaServices derives the country FROM the bag (_countryCodeFromBag:), and the bag
+# cannot be fetched without a storefront -- AMSBagNetworkTask takes one as an argument. AMSDefaults holds
+# storefrontSuffixes, not a storefront. So there is no file that can be shipped to fake this: it needs
+# CommCenter working or an account signed in, and signing in is not a decision to be taken here.
# The one stall that looked like a second cause was the same cause. ALLOW="syncdefaultsd appstored" lost the
# home screen too (77 processes, no widgets) with no retry storm at all, which seemed to rule nsurlsessiond
# out -- but that run was built before nsurlsessiond came out of this tuple. Built again with it there, the