Fix DDI mounting again

This commit is contained in:
khanhduytran0
2026-06-14 09:41:57 +07:00
parent a4ad29a542
commit 253fddfcea
8 changed files with 121 additions and 10 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
@import Foundation;
#include <libgen.h>
typedef CF_ENUM(uint64_t, EligibilityDomainType) {
/// Install marketplace-distributed apps
@@ -100,7 +101,7 @@ int os_eligibility_get_domain_answer(EligibilityDomainType domain, EligibilityAn
%end
%ctor {
NSString *processName = NSProcessInfo.processInfo.processName;
NSString *processName = @(basename(argv[0]));
if ([processName isEqualToString:@"managedappdistributiond"] || [processName isEqualToString:@"installd"]) {
%init(Hook_os_eligibility_get_domain_answer);
} else if ([processName isEqualToString:@"appstorecomponentsd"]) {
+2 -1
View File
@@ -1,6 +1,7 @@
@import Foundation;
@import QuartzCore;
@import UIKit;
#include <libgen.h>
@interface SBContinuitySessionSystemEventMonitor : NSObject
- (BOOL)isUILocked;
@@ -43,7 +44,7 @@
%end
%ctor {
NSString *processName = NSProcessInfo.processInfo.processName;
NSString *processName = @(basename(argv[0]));
if (@available(iOS 18.0, *)) {
if ([processName isEqualToString:@"SpringBoard"]) {
%init(Hook_SpringBoard_iOS18);
+10 -5
View File
@@ -105,17 +105,22 @@ BOOL gCalledImg4Execute = NO;
// Fix boardID = 9
%hookf(errno_t, img4_chip_instantiate, const img4_chip_t *chip, img4_chip_instance_t *chip_instance) {
errno_t result = %orig;
if(!result && chip_instance->chid_bord == 9) {
chip_instance->chid_bord = 10;
chip_instance->chid_chip = 0x8101;
chip_instance->chid_ecid = 0;
// &&
if(!result) {
if (chip_instance->chid_bord == 9) {
chip_instance->chid_bord = 0x20;
chip_instance->chid_chip = 0xfe00;
chip_instance->chid_ecid = 0;
}
chip_instance->chid_cpro = chip_instance->chid_epro = 1;
chip_instance->chid_csec = chip_instance->chid_esec = 1;
}
return result;
}
%end
%ctor {
NSString *processName = NSProcessInfo.processInfo.processName;
NSString *processName = @(basename(argv[0]));
if ([processName isEqualToString:@"MobileStorageMounter"]) {
%init(Hook_MobileStorageMounter);
}
+1 -1
View File
@@ -19,7 +19,7 @@ Boolean SMJobSubmit(CFStringRef domain, CFDictionaryRef job, id auth, CFErrorRef
%end
%ctor {
NSString *processName = NSProcessInfo.processInfo.processName;
NSString *processName = @(basename(argv[0]));
if ([processName isEqualToString:@"hidd.nonui"]) {
%init(Hook_NonUI);
} else if ([processName isEqualToString:@"SwitchBoard"]) {
+103
View File
@@ -0,0 +1,103 @@
@import Foundation;
@import QuartzCore;
@import UIKit;
#include <libgen.h>
%group Hook_SpringBoard_GlassDynamicIsland
@interface CALayer(Private)
@property(atomic, assign) unsigned int disableUpdateMask;
@end
@interface CAGainMapLayer : CALayer
@end
@interface UIView(Private)
- (void)sbh_applyClearGlass;
@end
@interface _SBGainMapView : UIView
@end
@interface SBSystemApertureContainerView : UIView
@end
%hook CAGainMapLayer
- (void)setDisableUpdateMask:(uint32_t)mode {
if (mode == 0xffffffff) {
%orig(0);
} else {
%orig(mode|0xffff);
}
}
%end
@interface SBSystemApertureViewController : UIViewController
@end
%hook SBSystemApertureViewController
- (void)viewDidAppear:(BOOL)animated {
%orig;
static BOOL changed;
if (changed) return;
changed = YES;
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// Make background transparent
NSArray<UIView *> *bgParentSubviews = [[self valueForKey:@"_containerBackgroundParent"] subviews];
if (bgParentSubviews.count < 2) return;
UIView *bgParentView = bgParentSubviews[1];
bgParentView.clipsToBounds = NO;
UIView *bgView = bgParentView.subviews[0];
bgView.backgroundColor = nil;
changed = YES;
// add invisible gain map layer
_SBGainMapView *gainMapView = [[NSClassFromString(@"_SBGainMapView") alloc] initWithFrame:CGRectMake(0,0,1,1)];
gainMapView.layer.disableUpdateMask = 0xffffffff;
[self.view addSubview:gainMapView];
});
}
%end
static UIView *lightBkgKeyLineView, *darkBkgKeyLineView;
%hook SBSystemApertureContainerView
- (void)_updateShadowStyleIfNeeded {
%orig;
static BOOL changed;
if (changed) return;
changed = YES;
// Apply Clear Glass effect
if (!lightBkgKeyLineView || !darkBkgKeyLineView) {
Ivar lightIvar = class_getInstanceVariable(self.class, "_lightBkgKeyLineView");
Ivar darkIvar = class_getInstanceVariable(self.class, "_darkBkgKeyLineView");
lightBkgKeyLineView = object_getIvar(self, lightIvar);
darkBkgKeyLineView = object_getIvar(self, darkIvar);
}
[lightBkgKeyLineView sbh_applyClearGlass];
[darkBkgKeyLineView sbh_applyClearGlass];
}
- (void)setKeyLineMode:(int64_t)mode {
// idk this doesnt work if I put it in constructor
static BOOL changed;
if (!changed) {
changed = YES;
MSImageRef image = MSGetImageByName("/System/Library/PrivateFrameworks/SpringBoard.framework/SpringBoard");
CGFloat *opacity = MSFindSymbol(image, "_SBSystemApertureKeyLineDarkBkgEnabledOpacity");
*opacity = 1;
}
%orig(mode);
if (mode == 2) {
darkBkgKeyLineView.backgroundColor = [darkBkgKeyLineView.backgroundColor colorWithAlphaComponent:0.345];
}
}
%end
%end
extern CGFloat SBSystemApertureKeyLineDarkBkgEnabledOpacity;
%ctor {
NSString *processName = @(basename(argv[0]));
if (@available(iOS 26.0, *)) {
if ([processName isEqualToString:@"SpringBoard"]) {
%init(Hook_SpringBoard_GlassDynamicIsland);
}
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ include $(THEOS)/makefiles/common.mk
TWEAK_NAME = aintuitweaks
aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x NineteenPatches.x FixNonUI.x
aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x NineteenPatches.x FixNonUI.x LiquidGlassDynamicIsland.x
aintuitweaks_CFLAGS = -fobjc-arc
aintuitweaks_FRAMEWORKS = IOKit
aintuitweaks_PRIVATE_FRAMEWORKS = ServiceManagement
+1
View File
@@ -2,6 +2,7 @@
%ctor {
MSImageRef image = MSGetImageByName("/usr/lib/swift/libswiftCore.dylib");
if (!image) return;
uint32_t *symbol = MSFindSymbol(image, "__ZNSt3__110__function6__funcIZL27_checkWitnessTableIsolationPKN5swift14TargetMetadataINS2_9InProcessEEEPKNS2_18TargetWitnessTableIS4_EEN7__swift9__runtime4llvm8ArrayRefIPKvEERNS2_27ConformanceExecutionContextEE3$_0NS_9allocatorISL_EEFSH_jjEED1Ev");
uint32_t xpacd_x0 = 0xdac147e0;
uint32_t ret = 0xd65f03c0;
+1 -1
View File
@@ -14,4 +14,4 @@
MobileStorageMounter,
);
};
}
}