├── kernelcache_decryptor.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── xcuserdata │ └── peternguyen.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ └── xcschememanagement.plist └── project.pbxproj ├── README.md └── kernelcache_decryptor ├── img4.asn1 ├── img4.h └── main.c /kernelcache_decryptor.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /kernelcache_decryptor.xcodeproj/xcuserdata/peternguyen.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /kernelcache_decryptor.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # kernelcache_decryptor 2 | Kernel Cache Decryption for iOS 12 or laters working on mac M1 3 | 4 | # Requirements: 5 | * **macOS**: 6 | ```bash 7 | brew install lzfse, libtasn1 8 | ``` 9 | # Run: 10 | ``` 11 | ./kernelcache_decryptor 12 | ``` 13 | 14 | # Demo: 15 | Decrypting iOS 15 kernel on mac mini M1 16 | [![asciicast](https://asciinema.org/a/O1YpcchgyhVhOql20c25h4W0O.svg)](https://asciinema.org/a/O1YpcchgyhVhOql20c25h4W0O) 17 | -------------------------------------------------------------------------------- /kernelcache_decryptor/img4.asn1: -------------------------------------------------------------------------------- 1 | Img4 { } 2 | 3 | DEFINITIONS EXPLICIT TAGS ::= 4 | 5 | BEGIN 6 | 7 | Img4Payload ::= SEQUENCE { 8 | magic IA5String (SIZE(1..4)), 9 | type IA5String (SIZE(1..4)), 10 | description IA5String (SIZE(1..128)), 11 | data OCTET STRING, 12 | 13 | -- This appears to be a sequence with two integers, 14 | -- at least for the DeviceTree file. 15 | extra ANY OPTIONAL 16 | } 17 | 18 | END 19 | -------------------------------------------------------------------------------- /kernelcache_decryptor.xcodeproj/xcuserdata/peternguyen.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | kernelcache_decryptor.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /kernelcache_decryptor/img4.h: -------------------------------------------------------------------------------- 1 | // Generated by asn1Parser -o img4.c -n img4_definitions_array img4.asn1 2 | 3 | #include 4 | 5 | const asn1_static_node img4_definitions_array[] = { 6 | { "Img4", 536872976, NULL }, 7 | { NULL, 1073741836, NULL }, 8 | { "Img4Payload", 536870917, NULL }, 9 | { "magic", 1075839005, NULL }, 10 | { "type", 1075839005, NULL }, 11 | { "description", 1075839005, NULL }, 12 | { "data", 1073741831, NULL }, 13 | { "extra", 16397, NULL }, 14 | { NULL, 0, NULL } 15 | }; 16 | -------------------------------------------------------------------------------- /kernelcache_decryptor/main.c: -------------------------------------------------------------------------------- 1 | // 2 | // main.c 3 | // kernelcache_decryptor 4 | // 5 | // Created by Peter Nguyen on 14/11/21. 6 | // 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include "img4.h" 15 | 16 | int file_get_content(const char *fn, unsigned char **file_data, uint32_t *data_length) 17 | { 18 | FILE *fp; 19 | uint32_t file_size; 20 | 21 | fp = fopen(fn, "rb"); 22 | if(!fp){ 23 | fprintf(stderr, "Unable to open file %s\n", fn); 24 | return 1; 25 | } 26 | 27 | fseek(fp, 0, SEEK_END); 28 | file_size = (uint32_t)ftell(fp); 29 | fseek(fp, 0, SEEK_SET); 30 | 31 | *file_data = (unsigned char *)malloc(file_size); 32 | fread(*file_data, file_size, 1, fp); 33 | *data_length = file_size; 34 | fclose(fp); 35 | return 0; 36 | } 37 | 38 | int img4_extract(const char *fn, char *payload_type, unsigned char **payload_data, uint32_t *payload_data_length) 39 | { 40 | /* 41 | Borrow from qemu-T8030 project and port it to work with mac mini M1 42 | */ 43 | 44 | unsigned char *file_data; 45 | uint32_t file_size; 46 | char errorDescription[ASN1_MAX_ERROR_DESCRIPTION_SIZE]; 47 | asn1_node img4_definitions = NULL; 48 | asn1_node img4; 49 | int ret; 50 | char magic[4]; 51 | char description[128]; 52 | int len; 53 | 54 | if(file_get_content(fn, &file_data, &file_size)){ 55 | return 1; 56 | } 57 | 58 | if (asn1_array2tree(img4_definitions_array, &img4_definitions, errorDescription)) { 59 | fprintf(stderr, "Could not initialize the ASN.1 parser: %s.", errorDescription); 60 | free(file_data); 61 | return 1; 62 | } 63 | 64 | if ((ret = asn1_create_element(img4_definitions, "Img4.Img4Payload", &img4) != ASN1_SUCCESS)) { 65 | fprintf(stderr, "Could not create an Img4Payload element: %d", ret); 66 | free(file_data); 67 | return 1; 68 | } 69 | 70 | if ((ret = asn1_der_decoding(&img4, (const uint8_t*)file_data, (uint32_t)file_size, errorDescription)) != ASN1_SUCCESS) { 71 | fprintf(stderr, "Could not parse asn1 img4: %d", ret); 72 | free(file_data); 73 | return 1; 74 | } 75 | 76 | len = 4; 77 | if ((ret = asn1_read_value(img4, "magic", magic, &len)) != ASN1_SUCCESS) { 78 | fprintf(stderr, "Failed to read the im4p magic in file '%s': %d.", fn, ret); 79 | free(file_data); 80 | return ret; 81 | } 82 | 83 | if (strncmp(magic, "IM4P", 4) != 0) { 84 | fprintf(stderr, "Couldn't parse ASN.1 data in file '%s' because it does not start with the IM4P header.", fn); 85 | free(file_data); 86 | return ret; 87 | } 88 | 89 | len = 4; 90 | if ((ret = asn1_read_value(img4, "type", payload_type, &len)) != ASN1_SUCCESS) { 91 | fprintf(stderr, "Failed to read the im4p type in file '%s': %d.", fn, ret); 92 | return ret; 93 | } 94 | 95 | len = 128; 96 | if ((ret = asn1_read_value(img4, "description", description, &len)) != ASN1_SUCCESS) { 97 | fprintf(stderr, "Failed to read the im4p description in file '%s': %d.", fn, ret); 98 | free(file_data); 99 | return ret; 100 | } 101 | 102 | *payload_data = NULL; 103 | *payload_data_length = 0; 104 | 105 | // extract payload_data_length first 106 | if ((ret = asn1_read_value(img4, "data", *payload_data, (int *)payload_data_length) != ASN1_MEM_ERROR)) { 107 | fprintf(stderr, "Failed to read the im4p payload in file '%s': %d.", fn, ret); 108 | free(file_data); 109 | return ret; 110 | } 111 | 112 | // extract compressed payload data from IMG4 format 113 | *payload_data = (unsigned char *)malloc(*payload_data_length); 114 | if ((ret = asn1_read_value(img4, "data", *payload_data, (int *)payload_data_length) != ASN1_SUCCESS)) { 115 | fprintf(stderr, "Failed to read the im4p payload in file '%s': %d.", fn, ret); 116 | free(file_data); 117 | return ret; 118 | } 119 | 120 | /* 121 | Determine whether the payload is LZFSE-compressed: LZFSE-compressed files contains various buffer blocks, 122 | and each buffer block starts with bvx? magic, where ? is -, 1, 2 or n. 123 | See https://github.com/lzfse/lzfse/blob/e634ca58b4821d9f3d560cdc6df5dec02ffc93fd/src/lzfse_internal.h 124 | for the details 125 | */ 126 | if ((*payload_data)[0] == 'b' && (*payload_data)[1] == 'v' && (*payload_data)[2] == 'x') { 127 | size_t decode_buffer_size = *payload_data_length * 8; 128 | uint8_t *decode_buffer = (uint8_t *)malloc(decode_buffer_size); 129 | 130 | // decompress the payload 131 | int decoded_length = lzfse_decode_buffer(decode_buffer, decode_buffer_size, (const uint8_t *)*payload_data, (size_t)*payload_data_length, NULL); 132 | if (decoded_length == 0 || decoded_length == decode_buffer_size) { 133 | fprintf(stderr, "Could not decompress LZFSE-compressed data in file '%s' because the decode buffer was too small.", fn); 134 | free(file_data); 135 | free(*payload_data); 136 | free(decode_buffer); 137 | *payload_data = NULL; 138 | return 1; 139 | } 140 | 141 | free(*payload_data); 142 | *payload_data = decode_buffer; 143 | *payload_data_length = (uint32_t)decode_buffer_size; 144 | } 145 | 146 | free(file_data); 147 | return 0; 148 | } 149 | 150 | int main(int argc, const char * argv[]) { 151 | char kn_cache_out[PATH_MAX]; 152 | struct stat kn_cache_stat; 153 | unsigned char *kernel_cache = NULL; 154 | uint32_t kernel_cache_size = 0; 155 | char payload_type[4]; 156 | FILE *fp; 157 | 158 | if(argc < 2){ 159 | printf("Usage %s: \n", argv[0]); 160 | return 1; 161 | } 162 | 163 | if(stat(argv[1], &kn_cache_stat)){ 164 | printf("File %s is not exists.\n",argv[1]); 165 | return 1; 166 | } 167 | 168 | bzero(kn_cache_out, PATH_MAX); 169 | snprintf(kn_cache_out, PATH_MAX, "%s.decrypt", argv[1]); 170 | 171 | if(img4_extract(argv[1], payload_type, &kernel_cache, &kernel_cache_size)){ 172 | return 1; 173 | } 174 | 175 | printf("Extract kernelcache is done, writting kernelcache into file %s\n", kn_cache_out); 176 | fp = fopen(kn_cache_out, "wb"); 177 | if(!fp){ 178 | fprintf(stderr, "Unable to open file %s for writting.\n", kn_cache_out); 179 | return 1; 180 | } 181 | 182 | fwrite(kernel_cache, kernel_cache_size, 1, fp); 183 | fclose(fp); 184 | free(kernel_cache); 185 | puts("Done"); 186 | 187 | return 0; 188 | } 189 | -------------------------------------------------------------------------------- /kernelcache_decryptor.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 55; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 47D09A022740F8F7006DF77C /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 47D09A012740F8F7006DF77C /* main.c */; }; 11 | 47D09A0C2742390D006DF77C /* liblzfse.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 47D09A0B2742390D006DF77C /* liblzfse.dylib */; }; 12 | 47D09A0F274240A8006DF77C /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 47D09A0E274240A8006DF77C /* Security.framework */; }; 13 | 47D09A14274242B2006DF77C /* libtasn1.6.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 47D09A13274242B2006DF77C /* libtasn1.6.dylib */; }; 14 | /* End PBXBuildFile section */ 15 | 16 | /* Begin PBXCopyFilesBuildPhase section */ 17 | 47D099FC2740F8F7006DF77C /* CopyFiles */ = { 18 | isa = PBXCopyFilesBuildPhase; 19 | buildActionMask = 2147483647; 20 | dstPath = /usr/share/man/man1/; 21 | dstSubfolderSpec = 0; 22 | files = ( 23 | ); 24 | runOnlyForDeploymentPostprocessing = 1; 25 | }; 26 | /* End PBXCopyFilesBuildPhase section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 47D099FE2740F8F7006DF77C /* kernelcache_decryptor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = kernelcache_decryptor; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 47D09A012740F8F7006DF77C /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = ""; }; 31 | 47D09A082740FE1B006DF77C /* img4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = img4.h; sourceTree = ""; }; 32 | 47D09A092740FE1C006DF77C /* img4.asn1 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = img4.asn1; sourceTree = ""; }; 33 | 47D09A0B2742390D006DF77C /* liblzfse.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = liblzfse.dylib; path = ../../../../opt/homebrew/Cellar/lzfse/1.0/lib/liblzfse.dylib; sourceTree = ""; }; 34 | 47D09A0E274240A8006DF77C /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; 35 | 47D09A1027424228006DF77C /* lib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = lib; path = ../../../../opt/homebrew/lib; sourceTree = ""; }; 36 | 47D09A13274242B2006DF77C /* libtasn1.6.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libtasn1.6.dylib; path = ../../../../opt/homebrew/Cellar/libtasn1/4.18.0/lib/libtasn1.6.dylib; sourceTree = ""; }; 37 | /* End PBXFileReference section */ 38 | 39 | /* Begin PBXFrameworksBuildPhase section */ 40 | 47D099FB2740F8F7006DF77C /* Frameworks */ = { 41 | isa = PBXFrameworksBuildPhase; 42 | buildActionMask = 2147483647; 43 | files = ( 44 | 47D09A14274242B2006DF77C /* libtasn1.6.dylib in Frameworks */, 45 | 47D09A0F274240A8006DF77C /* Security.framework in Frameworks */, 46 | 47D09A0C2742390D006DF77C /* liblzfse.dylib in Frameworks */, 47 | ); 48 | runOnlyForDeploymentPostprocessing = 0; 49 | }; 50 | /* End PBXFrameworksBuildPhase section */ 51 | 52 | /* Begin PBXGroup section */ 53 | 47D099F52740F8F7006DF77C = { 54 | isa = PBXGroup; 55 | children = ( 56 | 47D09A002740F8F7006DF77C /* kernelcache_decryptor */, 57 | 47D099FF2740F8F7006DF77C /* Products */, 58 | 47D09A0A2742390C006DF77C /* Frameworks */, 59 | ); 60 | sourceTree = ""; 61 | }; 62 | 47D099FF2740F8F7006DF77C /* Products */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | 47D099FE2740F8F7006DF77C /* kernelcache_decryptor */, 66 | ); 67 | name = Products; 68 | sourceTree = ""; 69 | }; 70 | 47D09A002740F8F7006DF77C /* kernelcache_decryptor */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | 47D09A092740FE1C006DF77C /* img4.asn1 */, 74 | 47D09A082740FE1B006DF77C /* img4.h */, 75 | 47D09A012740F8F7006DF77C /* main.c */, 76 | ); 77 | path = kernelcache_decryptor; 78 | sourceTree = ""; 79 | }; 80 | 47D09A0A2742390C006DF77C /* Frameworks */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 47D09A13274242B2006DF77C /* libtasn1.6.dylib */, 84 | 47D09A1027424228006DF77C /* lib */, 85 | 47D09A0E274240A8006DF77C /* Security.framework */, 86 | 47D09A0B2742390D006DF77C /* liblzfse.dylib */, 87 | ); 88 | name = Frameworks; 89 | sourceTree = ""; 90 | }; 91 | /* End PBXGroup section */ 92 | 93 | /* Begin PBXNativeTarget section */ 94 | 47D099FD2740F8F7006DF77C /* kernelcache_decryptor */ = { 95 | isa = PBXNativeTarget; 96 | buildConfigurationList = 47D09A052740F8F7006DF77C /* Build configuration list for PBXNativeTarget "kernelcache_decryptor" */; 97 | buildPhases = ( 98 | 47D099FA2740F8F7006DF77C /* Sources */, 99 | 47D099FB2740F8F7006DF77C /* Frameworks */, 100 | 47D099FC2740F8F7006DF77C /* CopyFiles */, 101 | ); 102 | buildRules = ( 103 | ); 104 | dependencies = ( 105 | ); 106 | name = kernelcache_decryptor; 107 | productName = kernelcache_decryptor; 108 | productReference = 47D099FE2740F8F7006DF77C /* kernelcache_decryptor */; 109 | productType = "com.apple.product-type.tool"; 110 | }; 111 | /* End PBXNativeTarget section */ 112 | 113 | /* Begin PBXProject section */ 114 | 47D099F62740F8F7006DF77C /* Project object */ = { 115 | isa = PBXProject; 116 | attributes = { 117 | BuildIndependentTargetsInParallel = 1; 118 | LastUpgradeCheck = 1310; 119 | TargetAttributes = { 120 | 47D099FD2740F8F7006DF77C = { 121 | CreatedOnToolsVersion = 13.1; 122 | }; 123 | }; 124 | }; 125 | buildConfigurationList = 47D099F92740F8F7006DF77C /* Build configuration list for PBXProject "kernelcache_decryptor" */; 126 | compatibilityVersion = "Xcode 13.0"; 127 | developmentRegion = en; 128 | hasScannedForEncodings = 0; 129 | knownRegions = ( 130 | en, 131 | Base, 132 | ); 133 | mainGroup = 47D099F52740F8F7006DF77C; 134 | productRefGroup = 47D099FF2740F8F7006DF77C /* Products */; 135 | projectDirPath = ""; 136 | projectRoot = ""; 137 | targets = ( 138 | 47D099FD2740F8F7006DF77C /* kernelcache_decryptor */, 139 | ); 140 | }; 141 | /* End PBXProject section */ 142 | 143 | /* Begin PBXSourcesBuildPhase section */ 144 | 47D099FA2740F8F7006DF77C /* Sources */ = { 145 | isa = PBXSourcesBuildPhase; 146 | buildActionMask = 2147483647; 147 | files = ( 148 | 47D09A022740F8F7006DF77C /* main.c in Sources */, 149 | ); 150 | runOnlyForDeploymentPostprocessing = 0; 151 | }; 152 | /* End PBXSourcesBuildPhase section */ 153 | 154 | /* Begin XCBuildConfiguration section */ 155 | 47D09A032740F8F7006DF77C /* Debug */ = { 156 | isa = XCBuildConfiguration; 157 | buildSettings = { 158 | ALWAYS_SEARCH_USER_PATHS = NO; 159 | CLANG_ANALYZER_NONNULL = YES; 160 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 161 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 162 | CLANG_CXX_LIBRARY = "libc++"; 163 | CLANG_ENABLE_MODULES = YES; 164 | CLANG_ENABLE_OBJC_ARC = YES; 165 | CLANG_ENABLE_OBJC_WEAK = YES; 166 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 167 | CLANG_WARN_BOOL_CONVERSION = YES; 168 | CLANG_WARN_COMMA = YES; 169 | CLANG_WARN_CONSTANT_CONVERSION = YES; 170 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 171 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 172 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 173 | CLANG_WARN_EMPTY_BODY = YES; 174 | CLANG_WARN_ENUM_CONVERSION = YES; 175 | CLANG_WARN_INFINITE_RECURSION = YES; 176 | CLANG_WARN_INT_CONVERSION = YES; 177 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 178 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 179 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 180 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 181 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 182 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 183 | CLANG_WARN_STRICT_PROTOTYPES = YES; 184 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 185 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 186 | CLANG_WARN_UNREACHABLE_CODE = YES; 187 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 188 | COPY_PHASE_STRIP = NO; 189 | DEBUG_INFORMATION_FORMAT = dwarf; 190 | ENABLE_STRICT_OBJC_MSGSEND = YES; 191 | ENABLE_TESTABILITY = YES; 192 | GCC_C_LANGUAGE_STANDARD = gnu11; 193 | GCC_DYNAMIC_NO_PIC = NO; 194 | GCC_NO_COMMON_BLOCKS = YES; 195 | GCC_OPTIMIZATION_LEVEL = 0; 196 | GCC_PREPROCESSOR_DEFINITIONS = ( 197 | "DEBUG=1", 198 | "$(inherited)", 199 | ); 200 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 201 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 202 | GCC_WARN_UNDECLARED_SELECTOR = YES; 203 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 204 | GCC_WARN_UNUSED_FUNCTION = YES; 205 | GCC_WARN_UNUSED_VARIABLE = YES; 206 | MACOSX_DEPLOYMENT_TARGET = 12.0; 207 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 208 | MTL_FAST_MATH = YES; 209 | ONLY_ACTIVE_ARCH = YES; 210 | OTHER_CFLAGS = ""; 211 | "OTHER_CFLAGS[arch=*]" = ( 212 | "-I", 213 | /opt/homebrew/include/, 214 | ); 215 | SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; 216 | SDKROOT = macosx; 217 | }; 218 | name = Debug; 219 | }; 220 | 47D09A042740F8F7006DF77C /* Release */ = { 221 | isa = XCBuildConfiguration; 222 | buildSettings = { 223 | ALWAYS_SEARCH_USER_PATHS = NO; 224 | CLANG_ANALYZER_NONNULL = YES; 225 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 226 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++17"; 227 | CLANG_CXX_LIBRARY = "libc++"; 228 | CLANG_ENABLE_MODULES = YES; 229 | CLANG_ENABLE_OBJC_ARC = YES; 230 | CLANG_ENABLE_OBJC_WEAK = YES; 231 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 232 | CLANG_WARN_BOOL_CONVERSION = YES; 233 | CLANG_WARN_COMMA = YES; 234 | CLANG_WARN_CONSTANT_CONVERSION = YES; 235 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 236 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 237 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 238 | CLANG_WARN_EMPTY_BODY = YES; 239 | CLANG_WARN_ENUM_CONVERSION = YES; 240 | CLANG_WARN_INFINITE_RECURSION = YES; 241 | CLANG_WARN_INT_CONVERSION = YES; 242 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 243 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 244 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 245 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 246 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 247 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 248 | CLANG_WARN_STRICT_PROTOTYPES = YES; 249 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 250 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 251 | CLANG_WARN_UNREACHABLE_CODE = YES; 252 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 253 | COPY_PHASE_STRIP = NO; 254 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 255 | ENABLE_NS_ASSERTIONS = NO; 256 | ENABLE_STRICT_OBJC_MSGSEND = YES; 257 | GCC_C_LANGUAGE_STANDARD = gnu11; 258 | GCC_NO_COMMON_BLOCKS = YES; 259 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 260 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 261 | GCC_WARN_UNDECLARED_SELECTOR = YES; 262 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 263 | GCC_WARN_UNUSED_FUNCTION = YES; 264 | GCC_WARN_UNUSED_VARIABLE = YES; 265 | MACOSX_DEPLOYMENT_TARGET = 12.0; 266 | MTL_ENABLE_DEBUG_INFO = NO; 267 | MTL_FAST_MATH = YES; 268 | OTHER_CFLAGS = ""; 269 | "OTHER_CFLAGS[arch=*]" = ( 270 | "-I", 271 | /opt/homebrew/include/, 272 | ); 273 | SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES; 274 | SDKROOT = macosx; 275 | }; 276 | name = Release; 277 | }; 278 | 47D09A062740F8F7006DF77C /* Debug */ = { 279 | isa = XCBuildConfiguration; 280 | buildSettings = { 281 | CODE_SIGN_STYLE = Automatic; 282 | DEVELOPMENT_TEAM = XM9H6X6U3S; 283 | ENABLE_HARDENED_RUNTIME = YES; 284 | LIBRARY_SEARCH_PATHS = ( 285 | "$(inherited)", 286 | /opt/homebrew/Cellar/lzfse/1.0/lib, 287 | /opt/homebrew/Cellar/libtasn1/4.18.0/lib, 288 | ); 289 | MACOSX_DEPLOYMENT_TARGET = 12.0; 290 | PRODUCT_NAME = "$(TARGET_NAME)"; 291 | }; 292 | name = Debug; 293 | }; 294 | 47D09A072740F8F7006DF77C /* Release */ = { 295 | isa = XCBuildConfiguration; 296 | buildSettings = { 297 | CODE_SIGN_STYLE = Automatic; 298 | DEVELOPMENT_TEAM = XM9H6X6U3S; 299 | ENABLE_HARDENED_RUNTIME = YES; 300 | LIBRARY_SEARCH_PATHS = ( 301 | "$(inherited)", 302 | /opt/homebrew/Cellar/lzfse/1.0/lib, 303 | /opt/homebrew/Cellar/libtasn1/4.18.0/lib, 304 | ); 305 | MACOSX_DEPLOYMENT_TARGET = 12.0; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | }; 308 | name = Release; 309 | }; 310 | /* End XCBuildConfiguration section */ 311 | 312 | /* Begin XCConfigurationList section */ 313 | 47D099F92740F8F7006DF77C /* Build configuration list for PBXProject "kernelcache_decryptor" */ = { 314 | isa = XCConfigurationList; 315 | buildConfigurations = ( 316 | 47D09A032740F8F7006DF77C /* Debug */, 317 | 47D09A042740F8F7006DF77C /* Release */, 318 | ); 319 | defaultConfigurationIsVisible = 0; 320 | defaultConfigurationName = Release; 321 | }; 322 | 47D09A052740F8F7006DF77C /* Build configuration list for PBXNativeTarget "kernelcache_decryptor" */ = { 323 | isa = XCConfigurationList; 324 | buildConfigurations = ( 325 | 47D09A062740F8F7006DF77C /* Debug */, 326 | 47D09A072740F8F7006DF77C /* Release */, 327 | ); 328 | defaultConfigurationIsVisible = 0; 329 | defaultConfigurationName = Release; 330 | }; 331 | /* End XCConfigurationList section */ 332 | }; 333 | rootObject = 47D099F62740F8F7006DF77C /* Project object */; 334 | } 335 | --------------------------------------------------------------------------------