mirror of
https://github.com/khanhduytran0/aintuitweaks.git
synced 2026-06-01 03:21:34 +02:00
Fix stuff
This commit is contained in:
+30
-3
@@ -1,14 +1,41 @@
|
||||
@import Foundation;
|
||||
|
||||
@interface SBContinuitySessionSystemEventMonitor : NSObject
|
||||
- (BOOL)isUILocked;
|
||||
- (void)_setUILocked:(BOOL)locked;
|
||||
@end
|
||||
|
||||
%group Hook_SpringBoard_iOS18
|
||||
%hook _SBContinuitySessionStateMachine
|
||||
- (void)_moveToInvalidStateForReasons:(id)reasons postToDelegate:(BOOL)post {
|
||||
// Do nothing
|
||||
- (void)_moveToInvalidStateForReasons:(NSArray *)reasons postToDelegate:(BOOL)post {
|
||||
for (NSString *reason in reasons) {
|
||||
if ([reason hasPrefix:@"block."]) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
%orig(reasons, post);
|
||||
}
|
||||
%end
|
||||
|
||||
%hook SBContinuitySessionSystemEventMonitor
|
||||
- (void)_setUILocked:(BOOL)locked {
|
||||
%orig(YES);
|
||||
}
|
||||
|
||||
- (BOOL)isUILocked {
|
||||
if (!%orig()) {
|
||||
[self _setUILocked:YES];
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
%end
|
||||
%end
|
||||
|
||||
%ctor {
|
||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
||||
if (@available(iOS 18.0, *)) {
|
||||
%init(Hook_SpringBoard_iOS18);
|
||||
if ([processName isEqualToString:@"SpringBoard"]) {
|
||||
%init(Hook_SpringBoard_iOS18);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
#import <IOKit/IOKitLib.h>
|
||||
#import "SignedPDI.h"
|
||||
|
||||
#define IMG4_DGST_MAX_LEN (48u)
|
||||
typedef uint16_t img4_struct_version_t;
|
||||
typedef struct _img4_chip img4_chip_t;
|
||||
typedef uint64_t img4_chip_instance_omit_t;
|
||||
typedef struct _img4_dgst {
|
||||
img4_struct_version_t i4d_version;
|
||||
size_t i4d_len;
|
||||
uint8_t i4d_bytes[IMG4_DGST_MAX_LEN];
|
||||
} img4_dgst_t;
|
||||
typedef struct _img4_chip_instance {
|
||||
img4_struct_version_t chid_version;
|
||||
const img4_chip_t *chid_chip_family;
|
||||
@@ -45,6 +54,7 @@ typedef struct _img4_nonce {
|
||||
} img4_nonce_t;
|
||||
|
||||
const char *container_system_group_path_for_identifier(int, const char *group, void *error);
|
||||
errno_t img4_chip_instantiate(const img4_chip_t *chip, img4_chip_instance_t *chip_instance);
|
||||
errno_t img4_nonce_domain_copy_nonce(const img4_nonce_domain_t *nd, img4_nonce_t *n);
|
||||
int img4_firmware_execute(void* fw, const void *chip, const void *nonce);
|
||||
|
||||
@@ -93,13 +103,12 @@ BOOL gCalledImg4Execute = NO;
|
||||
}
|
||||
|
||||
// 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;
|
||||
if(!result && chip_instance->chip_bord == 9) {
|
||||
chip_instance->chip_bord = 10;
|
||||
chip_instance->chip_chip = 0x8101;
|
||||
chip_instance->chip_ecid = 0;
|
||||
if(!result && chip_instance->chid_bord == 9) {
|
||||
chip_instance->chid_bord = 10;
|
||||
chip_instance->chid_chip = 0x8101;
|
||||
chip_instance->chid_ecid = 0;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
@import Darwin;
|
||||
@import Foundation;
|
||||
|
||||
%group Hook_NonUI
|
||||
%hookf(kern_return_t, mach_port_construct, ipc_space_t task, mach_port_options_ptr_t options, mach_port_context_t context, mach_port_name_t *name) {
|
||||
options->flags &= ~0x10000; // fix EXC_GUARD crash
|
||||
return %orig;
|
||||
}
|
||||
%end
|
||||
|
||||
%group Hook_SwitchBoard
|
||||
Boolean SMJobSubmit(CFStringRef domain, CFDictionaryRef job, id auth, CFErrorRef *outError);
|
||||
%hookf(Boolean, SMJobSubmit, CFStringRef domain, CFDictionaryRef job, id auth, CFErrorRef *outError) {
|
||||
NSMutableDictionary *mutableJob = [(__bridge NSDictionary *)job mutableCopy];
|
||||
mutableJob[@"EnablePressuredExit"] = @(NO);
|
||||
mutableJob[@"EnableTransactions"] = @(NO);
|
||||
return %orig(domain, (__bridge CFDictionaryRef)mutableJob, auth, outError);
|
||||
}
|
||||
%end
|
||||
|
||||
%ctor {
|
||||
NSString *processName = NSProcessInfo.processInfo.processName;
|
||||
if ([processName isEqualToString:@"hidd.nonui"]) {
|
||||
%init(Hook_NonUI);
|
||||
} else if ([processName isEqualToString:@"SwitchBoard"]) {
|
||||
%init(Hook_SwitchBoard);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
TARGET := iphone:clang:latest:15.0
|
||||
TARGET := iphone:clang:18.4:15.0
|
||||
INSTALL_TARGET_PROCESSES = appstorecomponentsd installd managedappdistributiond SpringBoard MobileStorageMounter
|
||||
THEOS_PACKAGE_SCHEME := rootless
|
||||
|
||||
@@ -6,9 +6,10 @@ include $(THEOS)/makefiles/common.mk
|
||||
|
||||
TWEAK_NAME = aintuitweaks
|
||||
|
||||
aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x NineteenPatches.x
|
||||
aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x NineteenPatches.x FixNonUI.x
|
||||
aintuitweaks_CFLAGS = -fobjc-arc
|
||||
aintuitweaks_FRAMEWORKS = IOKit
|
||||
aintuitweaks_PRIVATE_FRAMEWORKS = ServiceManagement
|
||||
aintuitweaks_LIBRARIES = image4
|
||||
aintuitweaks_CODESIGN_FLAGS = -Cadhoc -S
|
||||
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@
|
||||
uint32_t xpacd_x0 = 0xdac147e0;
|
||||
uint32_t ret = 0xd65f03c0;
|
||||
if (symbol && symbol[-1] == ret && symbol[0] == ret) {
|
||||
MSHookMemory(symbol-4, &xpacd_x0, sizeof(uint32_t));
|
||||
MSHookMemory(symbol-1, &xpacd_x0, sizeof(uint32_t));
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -4,6 +4,8 @@
|
||||
"com.apple.UIKit",
|
||||
);
|
||||
Executables = (
|
||||
SwitchBoard,
|
||||
"hidd.nonui",
|
||||
SpringBoard,
|
||||
appstorecomponentsd,
|
||||
installd,
|
||||
@@ -11,4 +13,4 @@
|
||||
MobileStorageMounter,
|
||||
);
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user