Skip to content

Run a virtual iPhone on an Apple Silicon Mac.

Swift

Duo spike: publish the inner panel as a second built-in display

Jacky5532e4140c00
diff --git a/Research/0_binary_patch_comparison.md b/Research/0_binary_patch_comparison.md
index ce4c6c39..904846ed 100644
--- a/Research/0_binary_patch_comparison.md
+++ b/Research/0_binary_patch_comparison.md
@@ -5267,6 +5267,8 @@ The host VM view now derives its input geometry from the active Duo viewport (`a
> **QuickAction glyph scale made layout-proof (2026-10-28):** The button lays out its glyph with `setFrame:`, which undid the glyph transform whenever a layout pass followed the walk. Each `CSQuickActionImageGlyphView` now moves to a runtime subclass (`VPhoneQuickActionGlyphView`) whose `setFrame:` keeps the transform, and both glyphs take one factor, 0.70 of their native layout size (flashlight 14.2x25.7pt, camera 24.3x18.4pt, matching a real iPhone Duo screenshot), replacing the 16pt-long-side and 0.82 targets. The glyph class itself is still not modified.
+> **Duo inner display spike, Stage 0 (2026-10-28, branch spike/duo-virtual-inner, opt-in marker):** `libvphonefolddisplay.dylib` adds a 2853x2007 `CAWindowServerVirtualDisplay` in backboardd, tagged `unknown` (65536), and in SpringBoard reports it as CADisplay type 0 everywhere except inside `-[FBSDisplayConfiguration _initWithImmutableDisplay:originalDisplay:isMainDisplay:assertIfInvalid:]`, where it is type 4 (always-connected, not UIKit-main-like). BacklightServices and SpringBoard's embedded-scene gate both require type 0; FrontBoard's cloning source requires that only Main be main-like. Result on duospike-inner: always-connected `{Main, Unknown[7]}`, inner scenes on `Unknown[7]`, PosterKit `DISPLAY_TYPE_AUX` with dynamic rotation, SpringBoard stable. Details in `Research/Guest/iphone_duo_bringup.md`.
+
> **CoverSheet native metrics probe (2026-10-27):** Static UIKit analysis of `UICoverSheetButton` identifies `_contentView` (`UIImageView`), `_image`, `_selectedImage`, `imageContentMode`, and `edgeInsets` as the real glyph layout inputs. Runtime inspection of `UIApplication.windows` while locked found no live `UICoverSheetButton` instances, so no scale was applied. The source now records the native metrics entry points and live hierarchy count; a guessed transform remains disabled.
> **Native Duo quick-action metrics (2026-10-27):** The real lock-screen classes are `CSQuickActionImageGlyphView` and `CSQuickActionsButton`, not `UICoverSheetButton`. Runtime SpringBoard evidence captured native initializer values: button diameter 58pt; camera symbol scale 0.31648; flashlight symbol scale 0.368; button frame 84pt with icon image frame 48pt. Temporary lifecycle/metrics probes were removed from the source after capture; no guessed scale or transform is shipped.
diff --git a/Research/Guest/iphone_duo_bringup.md b/Research/Guest/iphone_duo_bringup.md
index b77e9f8e..43fd7950 100644
--- a/Research/Guest/iphone_duo_bringup.md
+++ b/Research/Guest/iphone_duo_bringup.md
@@ -4186,3 +4186,72 @@ device does not do. The tall/wide split (16pt long side, camera 0.82) is gone.
Verified on duotest-m5: 14.2x25.7 and 24.3x18.4 on screen after two lock
cycles, a rotation to 90°, folding closed, opening, and another lock cycle.
+
+## 2026-10-28 night: dual-display spike, Stage 0
+
+The landscape-wallpaper hooks kept patching consequences of one fact: this
+guest has one portrait main display, so PosterKit classifies every scene as
+`DISPLAY_TYPE_EMBEDDED` and `PFContextSupportsDynamicRotation` says NO. A
+real iPhone Duo has a second, always-connected, non-main, landscape-native
+inner panel that PosterKit classifies as `DISPLAY_TYPE_AUX`. The spike
+publishes such a display inside the guest instead
+(`FoldDisplay/FoldDisplayInnerDisplay.m`, opt-in through
+`/var/mobile/Library/Caches/vphone-duo-inner-display`).
+
+Stage 0 asked for: two always-connected displays, a stable SpringBoard
+without suppressing any assertion, an inner window scene, and
+`PFContextSupportsDynamicRotation` YES with no detour. On duospike-inner
+(iPhone19,4, 27.1 24A94425) it reads:
+
+| Check | Result |
+|---|---|
+| always-connected identities | `{Main, Unknown[7]}` |
+| SpringBoard | same pid across 80 s of polling, no new crash report |
+| inner scenes | `com.apple.springboard.bringup`, `SB-systemAperture`, `SB-systemApertureCurtain` on `Unknown[7]` |
+| PosterKit | `Unknown[7]`: `DISPLAY_TYPE_AUX`, dynamic rotation 1; Main: EMBEDDED, 0 |
+
+What the display needs, each found by the failure it caused:
+
+1. **backboardd**: a `CAWindowServerVirtualDisplay` (2853×2007, 60 Hz,
+ named `VPhone Duo Inner`), enabled and tagged with the bit
+ `NSStringFromBKSDisplayTags` calls `unknown` (65536). FrontBoard drops a
+ source that is neither always-connected nor tagged.
+2. **SpringBoard, CADisplay type**: every reader except one sees type 0,
+ built-in. `-[FBSDisplayConfiguration _initWithImmutableDisplay:
+ originalDisplay:isMainDisplay:assertIfInvalid:]` sees type 4, scoped by a
+ thread-local flag around the original. In `_FBSCADisplayToDisplayTypes`
+ type 4 is always-connected but UIKit-main-like only when it is the main
+ display, so only Main claims the cloning source (two claimants is
+ `ManagedDisplaysController` "Cloning source already exists",
+ `SpringBoard-2026-10-26-005058.ips`). `_FBSCADisplayAlwaysConnected`, the
+ classifier's other caller, gives always-connected for 0 and 4 alike.
+3. **Why not type 4 everywhere**:
+ - `BLSHBacklightOSInterfaceProvider initWithPlatformProvider:` builds the
+ backlight hosts once from `[CADisplay displays]` filtered to
+ `displayType == 0`. Without a host, `SBBacklightController
+ initWithWindowScene:` passes a nil backlight and
+ `-[SBDisplayLinkController initWithCADisplay:backlight:]` traps
+ (`.cold.2`, SIGTRAP).
+ - `-[SBEmbeddedScenesConnectionManager _reevaluateSceneConnection]` waits
+ for a scene on the `uniqueId` of every type-0 display and runs on every
+ arrival. With the inner display at type 4 the expected set is {Main},
+ so the inner scene's arrival completed startup a second time and
+ `-[SBMainWorkspace setPipCoordinator:]` asserted.
+4. **Getter ABI on 27.1**: `-[CADisplay pointScale]` is `Q16@0:8`;
+ CADisplay has no `isAlwaysConnected`. The adapter reports pointScale 3 and
+ `isExternal` NO for the inner display only.
+
+Open for Stage 1 and beyond:
+
+- The display only reaches SpringBoard after a SpringBoard-only restart:
+ backboardd adds it about a second after SpringBoard's first display
+ enumeration, and BacklightServices reads the list once.
+- The inner configuration reports 669×951 bounds, not the panel's 951×669.
+- Nothing composites the inner display onto the framebuffer and no touch is
+ routed to it.
+
+Test trap: a VM restart's environment sync rewrote
+`/usr/lib/libvphonefolddisplay.dylib` with the bundle's copy about a second
+into boot, after the first SpringBoard and backboardd had loaded the pushed
+build. Later SpringBoards ran stock code without any error. Re-push and
+check the on-disk hash after every VM restart.
diff --git a/VPhoneGuestComponents/FoldDisplay/FoldDisplayInnerDisplay.m b/VPhoneGuestComponents/FoldDisplay/FoldDisplayInnerDisplay.m
new file mode 100644
index 00000000..3410afba
--- /dev/null
+++ b/VPhoneGuestComponents/FoldDisplay/FoldDisplayInnerDisplay.m
@@ -0,0 +1,193 @@
+// Spike: the Duo inner panel as a display of its own. A real iPhone Duo has a
+// cover main display and a non-main, always-connected, landscape-native inner
+// panel, which PosterKit classifies as auxiliary. This guest has one portrait
+// main display. Here backboardd adds a software render display for the inner
+// panel, and SpringBoard describes it as a built-in panel everywhere except
+// FrontBoard's classification, which sees CADisplay type 4: in
+// _FBSCADisplayToDisplayTypes that type is always-connected without being
+// UIKit-main-like, so only the real Main claims the cloning source (claiming
+// it twice is SpringBoard's "Cloning source already exists" assertion).
+//
+// Opt-in while the spike runs: both processes act only while
+// /var/mobile/Library/Caches/vphone-duo-inner-display exists. Remove the
+// file and restart backboardd and SpringBoard to return to the baseline.
+
+#import "FoldDisplayPrivate.h"
+
+static NSString *const vpInnerDisplayName = @"VPhone Duo Inner";
+static const char *vpInnerDisplayMarker = "/var/mobile/Library/Caches/vphone-duo-inner-display";
+static id vpInnerRenderDisplay;
+
+BOOL vpInnerDisplayRequested(void) {
+ return access(vpInnerDisplayMarker, F_OK) == 0;
+}
+
+// MARK: - backboardd: the render display
+
+@protocol VPhoneInnerDisplayInitialization
+- (instancetype)initWithOptions:(NSDictionary *)options;
+@end
+
+// Adds the inner panel's render display once the render server runs. It is
+// never removed: FrontBoard keeps identities for the life of the monitor.
+static void vpAddInnerRenderDisplay(unsigned int attempt) {
+ @try {
+ id server = ((id (*)(id, SEL))objc_msgSend)(objc_getClass("CAWindowServer"), sel_registerName("serverIfRunning"));
+ if (!server) {
+ if (attempt < 30)
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC), dispatch_get_main_queue(),
+ ^{ vpAddInnerRenderDisplay(attempt + 1); });
+ else
+ vpFoldDisplayLog(@"inner display: render server never ran");
+ return;
+ }
+ Class cls = objc_getClass("CAWindowServerVirtualDisplay");
+ Method initializer = class_getInstanceMethod(cls, sel_registerName("initWithOptions:"));
+ if (!initializer || strcmp(method_getTypeEncoding(initializer), "@24@0:8@16") != 0) {
+ vpFoldDisplayLog(@"inner display: virtual display initializer ABI unavailable");
+ return;
+ }
+ // The panel's native pixels, landscape: 951x669 points at 3x.
+ id display = [(id<VPhoneInnerDisplayInitialization>)[cls alloc] initWithOptions:@{
+ @"kCAVirtualDisplayWidth": @2853, @"kCAVirtualDisplayHeight": @2007,
+ @"kCAVirtualDisplayUpdateRate": @60, @"kCAVirtualDisplayName": vpInnerDisplayName,
+ }];
+ if (!display) { vpFoldDisplayLog(@"inner display: initializer returned nil"); return; }
+ ((void (*)(id, SEL, id))objc_msgSend)(server, sel_registerName("addDisplay:"), display);
+ SEL setEnabled = sel_registerName("setEnabled:");
+ Method enable = class_getInstanceMethod(object_getClass(display), setEnabled);
+ if (enable && strcmp(method_getTypeEncoding(enable), "v20@0:8B16") == 0)
+ ((void (*)(id, SEL, BOOL))objc_msgSend)(display, setEnabled, YES);
+ vpTagUnknownDisplay(display);
+ vpInnerRenderDisplay = display;
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: render display added %@", display]);
+ vpInspectRenderDisplays();
+ } @catch (NSException *exception) {
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: render display exception %@", exception.reason]);
+ }
+}
+
+void vpInstallInnerRenderDisplay(void) {
+ if (!vpInnerDisplayRequested()) return;
+ dispatch_async(dispatch_get_main_queue(), ^{ vpAddInnerRenderDisplay(0); });
+}
+
+// MARK: - SpringBoard: how the system sees it
+
+// The inner panel is a built-in panel (CADisplay type 0) to everything that
+// asks: BacklightServices gives a backlight host only to built-in displays,
+// and every SpringBoard window scene needs one; SpringBoard's startup waits
+// for a scene on every built-in display. Only FrontBoard's configuration
+// classification sees type 4, which there is always-connected without being
+// UIKit-main-like, so only the real Main claims the cloning source.
+static IMP vpOriginalDisplayType, vpOriginalPointScale, vpOriginalExternal, vpOriginalConfigurationInit;
+static _Thread_local BOOL vpClassifyingConfiguration;
+
+static BOOL vpIsInnerDisplay(id display) {
+ @try {
+ for (NSString *key in @[@"name", @"deviceName"]) {
+ if ([display respondsToSelector:NSSelectorFromString(key)] &&
+ [[display valueForKey:key] isEqual:vpInnerDisplayName]) return YES;
+ }
+ } @catch (__unused NSException *exception) {
+ }
+ return NO;
+}
+
+static long long vpInnerDisplayType(id self, SEL selector) {
+ if (!vpIsInnerDisplay(self)) return ((long long (*)(id, SEL))vpOriginalDisplayType)(self, selector);
+ return vpClassifyingConfiguration ? 4 : 0;
+}
+
+static id vpInnerConfigurationInit(id self, SEL selector, id display, id original, BOOL isMain, BOOL assertIfInvalid) {
+ vpClassifyingConfiguration = YES;
+ id result = ((id (*)(id, SEL, id, id, BOOL, BOOL))vpOriginalConfigurationInit)(self, selector, display, original, isMain, assertIfInvalid);
+ vpClassifyingConfiguration = NO;
+ return result;
+}
+
+static NSUInteger vpInnerPointScale(id self, SEL selector) {
+ return vpIsInnerDisplay(self) ? 3 : ((NSUInteger (*)(id, SEL))vpOriginalPointScale)(self, selector);
+}
+
+static BOOL vpInnerExternal(id self, SEL selector) {
+ return vpIsInnerDisplay(self) ? NO : ((BOOL (*)(id, SEL))vpOriginalExternal)(self, selector);
+}
+
+static IMP vpReplaceDisplayGetter(const char *name, const char *encoding, IMP replacement) {
+ Method method = class_getInstanceMethod(objc_getClass("CADisplay"), sel_registerName(name));
+ if (!method || strcmp(method_getTypeEncoding(method), encoding) != 0) {
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: -[CADisplay %s] %s, expected %s", name,
+ method ? method_getTypeEncoding(method) : "missing", encoding]);
+ return NULL;
+ }
+ return method_setImplementation(method, replacement);
+}
+
+// Installed before SpringBoard's display monitor reads the render displays.
+// CADisplay has no always-connected getter; FrontBoard derives that from
+// the type.
+void vpInstallInnerDisplayAdapter(void) {
+ if (!vpInnerDisplayRequested()) return;
+ // Type 0 without the FrontBoard scope is a second UIKit-main-like
+ // display, so no scope means no adapter.
+ Method configurationInit = class_getInstanceMethod(objc_getClass("FBSDisplayConfiguration"),
+ sel_registerName("_initWithImmutableDisplay:originalDisplay:isMainDisplay:assertIfInvalid:"));
+ const char *encoding = configurationInit ? method_getTypeEncoding(configurationInit) : "missing";
+ if (strcmp(encoding, "@40@0:8@16@24B32B36") != 0) {
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: configuration initializer %s, adapter off", encoding]);
+ return;
+ }
+ vpOriginalConfigurationInit = method_setImplementation(configurationInit, (IMP)vpInnerConfigurationInit);
+ vpOriginalDisplayType = vpReplaceDisplayGetter("displayType", "q16@0:8", (IMP)vpInnerDisplayType);
+ vpOriginalPointScale = vpReplaceDisplayGetter("pointScale", "Q16@0:8", (IMP)vpInnerPointScale);
+ vpOriginalExternal = vpReplaceDisplayGetter("isExternal", "B16@0:8", (IMP)vpInnerExternal);
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: adapter type=%d scale=%d external=%d",
+ vpOriginalDisplayType != NULL, vpOriginalPointScale != NULL, vpOriginalExternal != NULL]);
+}
+
+// MARK: - Stage 0 report
+
+// The spike's pass criteria, read live: the always-connected identities,
+// the window scenes and their displays, and PosterKit's own rotation answer
+// for each display's configuration.
+void vpInspectInnerDisplay(void) {
+ @try {
+ // The render displays as this process sees them, through the adapter.
+ for (id display in vpReadObject(objc_getClass("CADisplay"), "displays") ?: @[]) {
+ NSMutableString *line = [NSMutableString stringWithString:@"inner display: CADisplay"];
+ for (NSString *key in @[@"name", @"deviceName", @"displayId", @"displayType", @"tag", @"pointScale", @"isExternal", @"bounds"]) {
+ id value = nil;
+ @try { value = [display valueForKey:key]; } @catch (__unused NSException *exception) {}
+ [line appendFormat:@" %@=%@", key, value];
+ }
+ [line appendFormat:@" modes=%lu", (unsigned long)[vpReadObject(display, "availableModes") count]];
+ vpFoldDisplayLog(line);
+ }
+ Class manager = objc_getClass("FBDisplayManager");
+ id instance = vpReadObject(manager, "sharedInstance");
+ for (NSString *key in @[@"connectedIdentities", @"alwaysConnectedIdentities"]) {
+ id value = nil;
+ @try { value = [instance valueForKey:key]; } @catch (__unused NSException *exception) {}
+ if (!value && [manager respondsToSelector:NSSelectorFromString(key)]) value = [manager valueForKey:key];
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: %@ = %@", key, value]);
+ }
+ id app = vpReadObject(objc_getClass("UIApplication"), "sharedApplication");
+ BOOL (*supports)(id, id, NSInteger) = dlsym(RTLD_DEFAULT, "PFContextSupportsDynamicRotation");
+ id (*displayType)(id) = dlsym(RTLD_DEFAULT, "PRDisplayTypeFromFBSDisplayConfiguration");
+ NSInteger (*deviceClass)(void) = dlsym(RTLD_DEFAULT, "PFCurrentDeviceClass");
+ id __unsafe_unretained *lockRole = (id __unsafe_unretained *)dlsym(RTLD_DEFAULT, "PFPosterRoleLockScreen");
+ for (id scene in [vpReadObject(app, "connectedScenes") allObjects] ?: @[]) {
+ id configuration = nil;
+ @try { configuration = vpReadObject(vpReadObject(scene, "_FBSScene"), "settings"); configuration = vpReadObject(configuration, "displayConfiguration"); }
+ @catch (__unused NSException *exception) {}
+ id type = configuration && displayType ? displayType(configuration) : nil;
+ BOOL rotates = type && supports && deviceClass && lockRole && *lockRole ? supports(*lockRole, type, deviceClass()) : NO;
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: scene %@ %@ display=%@ bounds=%@ posterType=%@ dynamicRotation=%d",
+ NSStringFromClass([scene class]), vpReadObject(vpReadObject(scene, "_FBSScene"), "identifier"),
+ vpReadObject(configuration, "identity"), [configuration valueForKey:@"bounds"], type, rotates]);
+ }
+ } @catch (NSException *exception) {
+ vpFoldDisplayLog([NSString stringWithFormat:@"inner display: inspect exception %@", exception.reason]);
+ }
+}
diff --git a/VPhoneGuestComponents/FoldDisplay/FoldDisplayPrivate.h b/VPhoneGuestComponents/FoldDisplay/FoldDisplayPrivate.h
index 0609e8ba..22658fbf 100644
--- a/VPhoneGuestComponents/FoldDisplay/FoldDisplayPrivate.h
+++ b/VPhoneGuestComponents/FoldDisplay/FoldDisplayPrivate.h
@@ -175,9 +175,17 @@ void vpBeginSurfaceProbe(unsigned int surfaceType, BOOL pair);
void vpInspectServerClass(void);
void vpInspectRenderDisplays(void);
void vpEnableVirtualDisplayProbe(void);
+BOOL vpTagUnknownDisplay(id display);
void vpTagVirtualDisplayProbe(void);
void vpVirtualDisplayExperiment(BOOL create);
+// MARK: - inner display spike
+
+BOOL vpInnerDisplayRequested(void);
+void vpInstallInnerRenderDisplay(void);
+void vpInstallInnerDisplayAdapter(void);
+void vpInspectInnerDisplay(void);
+
// MARK: - diagnostics
extern id vpStashedConfig;
diff --git a/VPhoneGuestComponents/FoldDisplay/FoldDisplayVirtualDisplay.m b/VPhoneGuestComponents/FoldDisplay/FoldDisplayVirtualDisplay.m
index e178a496..99836949 100644
--- a/VPhoneGuestComponents/FoldDisplay/FoldDisplayVirtualDisplay.m
+++ b/VPhoneGuestComponents/FoldDisplay/FoldDisplayVirtualDisplay.m
@@ -71,33 +71,41 @@ void vpEnableVirtualDisplayProbe(void) {
}
}
-void vpTagVirtualDisplayProbe(void) {
+// Tags a render display with the BKS bit the guest itself describes as
+// `unknown`. FrontBoard drops an untagged source unless it is always
+// connected; this tag is what makes it publish one.
+BOOL vpTagUnknownDisplay(id display) {
@try {
NSString *(*describe)(NSUInteger) = dlsym(RTLD_DEFAULT, "NSStringFromBKSDisplayTags");
SEL setter = sel_registerName("setTag:");
- Method method = class_getInstanceMethod(object_getClass(vpVirtualDisplayProbe), setter);
+ Method method = class_getInstanceMethod(object_getClass(display), setter);
if (!describe || !method || strcmp(method_getTypeEncoding(method), "v24@0:8q16") != 0) {
vpFoldDisplayLog(@"virtual display tag: unavailable");
- return;
+ return NO;
}
NSUInteger unknown = 0;
for (unsigned int bit = 0; bit < 24; bit++) {
NSUInteger candidate = (NSUInteger)1 << bit;
NSString *label = describe(candidate);
if (label && [label rangeOfString:@"unknown" options:NSCaseInsensitiveSearch].location != NSNotFound) {
- if (unknown) { vpFoldDisplayLog(@"virtual display tag: ambiguous unknown bit"); return; }
+ if (unknown) { vpFoldDisplayLog(@"virtual display tag: ambiguous unknown bit"); return NO; }
unknown = candidate;
}
}
- if (!unknown) { vpFoldDisplayLog(@"virtual display tag: no unknown bit"); return; }
- ((void (*)(id, SEL, NSInteger))objc_msgSend)(vpVirtualDisplayProbe, setter, (NSInteger)unknown);
+ if (!unknown) { vpFoldDisplayLog(@"virtual display tag: no unknown bit"); return NO; }
+ ((void (*)(id, SEL, NSInteger))objc_msgSend)(display, setter, (NSInteger)unknown);
vpFoldDisplayLog([NSString stringWithFormat:@"virtual display tag: %@ (%lu)", describe(unknown), (unsigned long)unknown]);
- vpInspectRenderDisplays();
+ return YES;
} @catch (NSException *exception) {
vpFoldDisplayLog([NSString stringWithFormat:@"virtual display tag exception: %@", exception.reason]);
+ return NO;
}
}
+void vpTagVirtualDisplayProbe(void) {
+ if (vpTagUnknownDisplay(vpVirtualDisplayProbe)) vpInspectRenderDisplays();
+}
+
void vpVirtualDisplayExperiment(BOOL create) {
@try {
Class serverClass = objc_getClass("CAWindowServer");
diff --git a/VPhoneGuestComponents/FoldDisplay/libvphonefolddisplay.m b/VPhoneGuestComponents/FoldDisplay/libvphonefolddisplay.m
index c0443eb4..ec4941e9 100644
--- a/VPhoneGuestComponents/FoldDisplay/libvphonefolddisplay.m
+++ b/VPhoneGuestComponents/FoldDisplay/libvphonefolddisplay.m
@@ -16,6 +16,7 @@ BOOL vpAutomaticMainStatus;
// backboardd owns the render displays: the surface-type probe, the virtual
// display experiments and the orientation-event probes run there.
static void vpInstallBackboardProbes(void) {
+ vpInstallInnerRenderDisplay();
Method extended = class_getInstanceMethod(objc_getClass("CAWindowServerDisplay"), sel_registerName("extendedProperties"));
if (extended && strcmp(method_getTypeEncoding(extended), "@16@0:8") == 0) {
vpOriginalExtendedProperties = method_setImplementation(extended, (IMP)vpSurfaceExtendedProperties);
@@ -51,6 +52,7 @@ static void vpInstallBackboardProbes(void) {
// MARK: - SpringBoard hooks
static void vpInstallSpringBoardHooks(void) {
+ vpInstallInnerDisplayAdapter();
// The round-16 landscape wallpaper gate is now part of the Duo startup
// path. The one-shot marker remains accepted for older guests, but a
// fresh boot must not silently fall back to the portrait wallpaper
@@ -161,6 +163,9 @@ static void vpInstallSpringBoardHooks(void) {
// Every com.vphone.display.* request SpringBoard answers. Registration only
// installs the handlers; none runs before the constructor returns.
static void vpRegisterSpringBoardNotifications(void) {
+ static int innerDisplayInspectToken;
+ notify_register_dispatch("com.vphone.display.inner.inspect", &innerDisplayInspectToken, dispatch_get_main_queue(),
+ ^(int token) { vpInspectInnerDisplay(); });
static int persistentCoverToken, persistentInnerToken;
notify_register_dispatch("com.vphone.display.viewport.apply.cover", &persistentCoverToken, dispatch_get_main_queue(),
^(int token) { vpSetPersistentViewport(YES); });