mirror of
https://github.com/khanhduytran0/aintuitweaks.git
synced 2026-09-23 01:00:42 +02:00
Fix DDI mounting again
This commit is contained in:
+2
-1
@@ -1,4 +1,5 @@
|
|||||||
@import Foundation;
|
@import Foundation;
|
||||||
|
#include <libgen.h>
|
||||||
|
|
||||||
typedef CF_ENUM(uint64_t, EligibilityDomainType) {
|
typedef CF_ENUM(uint64_t, EligibilityDomainType) {
|
||||||
/// Install marketplace-distributed apps
|
/// Install marketplace-distributed apps
|
||||||
@@ -100,7 +101,7 @@ int os_eligibility_get_domain_answer(EligibilityDomainType domain, EligibilityAn
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
NSString *processName = @(basename(argv[0]));
|
||||||
if ([processName isEqualToString:@"managedappdistributiond"] || [processName isEqualToString:@"installd"]) {
|
if ([processName isEqualToString:@"managedappdistributiond"] || [processName isEqualToString:@"installd"]) {
|
||||||
%init(Hook_os_eligibility_get_domain_answer);
|
%init(Hook_os_eligibility_get_domain_answer);
|
||||||
} else if ([processName isEqualToString:@"appstorecomponentsd"]) {
|
} else if ([processName isEqualToString:@"appstorecomponentsd"]) {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
@import Foundation;
|
@import Foundation;
|
||||||
@import QuartzCore;
|
@import QuartzCore;
|
||||||
@import UIKit;
|
@import UIKit;
|
||||||
|
#include <libgen.h>
|
||||||
|
|
||||||
@interface SBContinuitySessionSystemEventMonitor : NSObject
|
@interface SBContinuitySessionSystemEventMonitor : NSObject
|
||||||
- (BOOL)isUILocked;
|
- (BOOL)isUILocked;
|
||||||
@@ -43,7 +44,7 @@
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
NSString *processName = @(basename(argv[0]));
|
||||||
if (@available(iOS 18.0, *)) {
|
if (@available(iOS 18.0, *)) {
|
||||||
if ([processName isEqualToString:@"SpringBoard"]) {
|
if ([processName isEqualToString:@"SpringBoard"]) {
|
||||||
%init(Hook_SpringBoard_iOS18);
|
%init(Hook_SpringBoard_iOS18);
|
||||||
|
|||||||
@@ -105,17 +105,22 @@ BOOL gCalledImg4Execute = NO;
|
|||||||
// Fix boardID = 9
|
// Fix boardID = 9
|
||||||
%hookf(errno_t, img4_chip_instantiate, const img4_chip_t *chip, img4_chip_instance_t *chip_instance) {
|
%hookf(errno_t, img4_chip_instantiate, const img4_chip_t *chip, img4_chip_instance_t *chip_instance) {
|
||||||
errno_t result = %orig;
|
errno_t result = %orig;
|
||||||
if(!result && chip_instance->chid_bord == 9) {
|
// &&
|
||||||
chip_instance->chid_bord = 10;
|
if(!result) {
|
||||||
chip_instance->chid_chip = 0x8101;
|
if (chip_instance->chid_bord == 9) {
|
||||||
chip_instance->chid_ecid = 0;
|
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;
|
return result;
|
||||||
}
|
}
|
||||||
%end
|
%end
|
||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
NSString *processName = @(basename(argv[0]));
|
||||||
if ([processName isEqualToString:@"MobileStorageMounter"]) {
|
if ([processName isEqualToString:@"MobileStorageMounter"]) {
|
||||||
%init(Hook_MobileStorageMounter);
|
%init(Hook_MobileStorageMounter);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ Boolean SMJobSubmit(CFStringRef domain, CFDictionaryRef job, id auth, CFErrorRef
|
|||||||
%end
|
%end
|
||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
NSString *processName = @(basename(argv[0]));
|
||||||
if ([processName isEqualToString:@"hidd.nonui"]) {
|
if ([processName isEqualToString:@"hidd.nonui"]) {
|
||||||
%init(Hook_NonUI);
|
%init(Hook_NonUI);
|
||||||
} else if ([processName isEqualToString:@"SwitchBoard"]) {
|
} else if ([processName isEqualToString:@"SwitchBoard"]) {
|
||||||
|
|||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ include $(THEOS)/makefiles/common.mk
|
|||||||
|
|
||||||
TWEAK_NAME = aintuitweaks
|
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_CFLAGS = -fobjc-arc
|
||||||
aintuitweaks_FRAMEWORKS = IOKit
|
aintuitweaks_FRAMEWORKS = IOKit
|
||||||
aintuitweaks_PRIVATE_FRAMEWORKS = ServiceManagement
|
aintuitweaks_PRIVATE_FRAMEWORKS = ServiceManagement
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
%ctor {
|
%ctor {
|
||||||
MSImageRef image = MSGetImageByName("/usr/lib/swift/libswiftCore.dylib");
|
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 *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 xpacd_x0 = 0xdac147e0;
|
||||||
uint32_t ret = 0xd65f03c0;
|
uint32_t ret = 0xd65f03c0;
|
||||||
|
|||||||
+1
-1
@@ -14,4 +14,4 @@
|
|||||||
MobileStorageMounter,
|
MobileStorageMounter,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user