From 4d4c5768f24d55c04a5901075679496acebbdabe Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Tue, 19 May 2026 12:56:21 +0700 Subject: [PATCH] Fix 19 stuff --- FixDDI.x | 36 ++++++++++++++++++++++++++++++++++++ Makefile | 2 +- NineteenPatches.x | 11 +++++++++++ filter.plist | 5 ++++- 4 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 NineteenPatches.x diff --git a/FixDDI.x b/FixDDI.x index 442e219..2f9a95f 100644 --- a/FixDDI.x +++ b/FixDDI.x @@ -3,6 +3,30 @@ #import #import "SignedPDI.h" +typedef struct _img4_chip_instance { + img4_struct_version_t chid_version; + const img4_chip_t *chid_chip_family; + img4_chip_instance_omit_t chid_omit; + uint32_t chid_cepo; + uint32_t chid_bord; + uint32_t chid_chip; + uint32_t chid_sdom; + uint64_t chid_ecid; + bool chid_cpro; + bool chid_csec; + bool chid_epro; + bool chid_esec; + bool chid_iuou; + bool chid_rsch; + bool chid_euou; + uint32_t chid_esdm; + bool chid_fpgt; + img4_dgst_t chid_udid; + uint32_t chid_fchp; + uint32_t chid_type; + uint32_t chid_styp; + uint32_t chid_clas; +} img4_chip_instance_t; struct _img4_nonce_domain { uint64_t cryptex1, index; }; @@ -67,6 +91,18 @@ BOOL gCalledImg4Execute = NO; } return ret; } + +// 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->chip_bord == 9) { + chip_instance->chip_bord = 10; + chip_instance->chip_chip = 0x8101; + chip_instance->chip_ecid = 0; + } + return result; +} %end %ctor { diff --git a/Makefile b/Makefile index dc0c5a3..aa62a32 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ include $(THEOS)/makefiles/common.mk TWEAK_NAME = aintuitweaks -aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x +aintuitweaks_FILES = BypassMarketplace.x BypassMirroringUnlock.x FixDDI.x NineteenPatches.x aintuitweaks_CFLAGS = -fobjc-arc aintuitweaks_FRAMEWORKS = IOKit aintuitweaks_LIBRARIES = image4 diff --git a/NineteenPatches.x b/NineteenPatches.x new file mode 100644 index 0000000..9237c7c --- /dev/null +++ b/NineteenPatches.x @@ -0,0 +1,11 @@ +#import + +%ctor { + MSImageRef image = MSGetImageByName("/usr/lib/swift/libswiftCore.dylib"); + 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; + if (symbol && symbol[-1] == ret && symbol[0] == ret) { + MSHookMemory(symbol-4, &xpacd_x0, sizeof(uint32_t)); + } +} diff --git a/filter.plist b/filter.plist index 4173a89..ca7fc60 100644 --- a/filter.plist +++ b/filter.plist @@ -1,5 +1,8 @@ { Filter = { + Bundles = ( + "com.apple.UIKit", + ); Executables = ( SpringBoard, appstorecomponentsd, @@ -8,4 +11,4 @@ MobileStorageMounter, ); }; -} \ No newline at end of file +}