diff --git a/Application/Dopamine.xcodeproj/project.pbxproj b/Application/Dopamine.xcodeproj/project.pbxproj index eb5189e86..c9945693a 100644 --- a/Application/Dopamine.xcodeproj/project.pbxproj +++ b/Application/Dopamine.xcodeproj/project.pbxproj @@ -48,6 +48,7 @@ 04DD0B442B7CBE2E0055DE4F /* DOThemeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B432B7CBE2E0055DE4F /* DOThemeManager.m */; }; 04DD0B472B7CBEEA0055DE4F /* DOTheme.m in Sources */ = {isa = PBXBuildFile; fileRef = 04DD0B462B7CBEEA0055DE4F /* DOTheme.m */; }; 04DD0B592B7D19E60055DE4F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 04DD0B5B2B7D19E60055DE4F /* Localizable.strings */; }; + 51F19D052BBF456200896361 /* libpartial.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 51AB98D92BBF44390042EA7B /* libpartial.a */; }; 8C029F432B4DFD5D0071DE58 /* DOExploitManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */; }; 8C029F462B4DFD910071DE58 /* DOBootstrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F452B4DFD910071DE58 /* DOBootstrapper.m */; }; 8C029F4E2B4E1FF30071DE58 /* DOExploit.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C029F4D2B4E1FF30071DE58 /* DOExploit.m */; }; @@ -120,9 +121,7 @@ 8CDD08342B4F63E100A32B61 /* kfd.m in Sources */ = {isa = PBXBuildFile; fileRef = 8CDD07B32B4F639100A32B61 /* kfd.m */; }; 8CDD08362B4F682000A32B61 /* IOSurface.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08352B4F682000A32B61 /* IOSurface.framework */; }; 8CDD08382B4F682500A32B61 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08372B4F682500A32B61 /* IOKit.framework */; }; - 8CDD083F2B4F6D8700A32B61 /* libcurl.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08392B4F6D8200A32B61 /* libcurl.a */; }; - 8CDD08402B4F6D8700A32B61 /* libfragmentzip.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD083A2B4F6D8200A32B61 /* libfragmentzip.a */; }; - 8CDD08412B4F6D8700A32B61 /* libgrabkernel.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD083B2B4F6D8200A32B61 /* libgrabkernel.a */; }; + 8CDD08412B4F6D8700A32B61 /* libgrabkernel2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD083B2B4F6D8200A32B61 /* libgrabkernel2.a */; }; 8CDD08462B4F6DD800A32B61 /* libchoma.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08432B4F6DD800A32B61 /* libchoma.dylib */; }; 8CDD08472B4F6DD800A32B61 /* libxpf.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8CDD08442B4F6DD800A32B61 /* libxpf.dylib */; }; 8CDD08482B4F6DF100A32B61 /* libxpf.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 8CDD08442B4F6DD800A32B61 /* libxpf.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; @@ -285,6 +284,7 @@ 04DD0B5A2B7D19E60055DE4F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; 04DD0B5C2B7D1A210055DE4F /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Localizable.strings; sourceTree = ""; }; 04DD0B5D2B7D1A210055DE4F /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + 51AB98D92BBF44390042EA7B /* libpartial.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpartial.a; path = Dopamine/Dependencies/libpartial.a; sourceTree = ""; }; 8C029F412B4DFD5D0071DE58 /* DOExploitManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOExploitManager.h; sourceTree = ""; }; 8C029F422B4DFD5D0071DE58 /* DOExploitManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DOExploitManager.m; sourceTree = ""; }; 8C029F442B4DFD910071DE58 /* DOBootstrapper.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOBootstrapper.h; sourceTree = ""; }; @@ -370,9 +370,7 @@ 8CDD07B32B4F639100A32B61 /* kfd.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = kfd.m; sourceTree = ""; }; 8CDD08352B4F682000A32B61 /* IOSurface.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOSurface.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/IOSurface.framework; sourceTree = DEVELOPER_DIR; }; 8CDD08372B4F682500A32B61 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/System/Library/Frameworks/IOKit.framework; sourceTree = DEVELOPER_DIR; }; - 8CDD08392B4F6D8200A32B61 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = Dopamine/Dependencies/libcurl.a; sourceTree = ""; }; - 8CDD083A2B4F6D8200A32B61 /* libfragmentzip.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfragmentzip.a; path = Dopamine/Dependencies/libfragmentzip.a; sourceTree = ""; }; - 8CDD083B2B4F6D8200A32B61 /* libgrabkernel.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgrabkernel.a; path = Dopamine/Dependencies/libgrabkernel.a; sourceTree = ""; }; + 8CDD083B2B4F6D8200A32B61 /* libgrabkernel2.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libgrabkernel2.a; path = Dopamine/Dependencies/libgrabkernel2.a; sourceTree = ""; }; 8CDD08422B4F6DD800A32B61 /* libjailbreak.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libjailbreak.dylib; path = ../BaseBin/.build/libjailbreak.dylib; sourceTree = ""; }; 8CDD08432B4F6DD800A32B61 /* libchoma.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libchoma.dylib; path = ../BaseBin/.build/libchoma.dylib; sourceTree = ""; }; 8CDD08442B4F6DD800A32B61 /* libxpf.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxpf.dylib; path = ../BaseBin/.build/libxpf.dylib; sourceTree = ""; }; @@ -406,11 +404,10 @@ 8CC139832B53E05300230143 /* IOKit.framework in Frameworks */, 8C029F682B4E31D50071DE58 /* libMobileGestalt.tbd in Frameworks */, 8C46D7252B588973002899DB /* libzstd in Frameworks */, - 8CDD08412B4F6D8700A32B61 /* libgrabkernel.a in Frameworks */, + 8CDD08412B4F6D8700A32B61 /* libgrabkernel2.a in Frameworks */, + 51F19D052BBF456200896361 /* libpartial.a in Frameworks */, 042479E52B66B0DD0082581B /* Preferences.framework in Frameworks */, - 8CDD08402B4F6D8700A32B61 /* libfragmentzip.a in Frameworks */, 8C029F662B4E2E970071DE58 /* libcompression.tbd in Frameworks */, - 8CDD083F2B4F6D8700A32B61 /* libcurl.a in Frameworks */, 8C58E5592B7EAF8000E3ADAA /* CoreServices.framework in Frameworks */, 8C4ABEB62B52094100B43C9B /* libjailbreak.dylib in Frameworks */, ); @@ -612,6 +609,7 @@ 8C029F642B4E2E7D0071DE58 /* Frameworks */ = { isa = PBXGroup; children = ( + 51AB98D92BBF44390042EA7B /* libpartial.a */, 8C58E5582B7EAF8000E3ADAA /* CoreServices.framework */, 042479E42B66B0DD0082581B /* Preferences.framework */, 8CDD08372B4F682500A32B61 /* IOKit.framework */, @@ -621,9 +619,7 @@ 8CDD08442B4F6DD800A32B61 /* libxpf.dylib */, 8C029F672B4E31D50071DE58 /* libMobileGestalt.tbd */, 8C029F652B4E2E7D0071DE58 /* libcompression.tbd */, - 8CDD08392B4F6D8200A32B61 /* libcurl.a */, - 8CDD083A2B4F6D8200A32B61 /* libfragmentzip.a */, - 8CDD083B2B4F6D8200A32B61 /* libgrabkernel.a */, + 8CDD083B2B4F6D8200A32B61 /* libgrabkernel2.a */, 8C029F6A2B4E320E0071DE58 /* libz.tbd */, ); name = Frameworks; diff --git a/Application/Dopamine/Dependencies/libcurl.a b/Application/Dopamine/Dependencies/libcurl.a deleted file mode 100644 index 8ede024e5..000000000 Binary files a/Application/Dopamine/Dependencies/libcurl.a and /dev/null differ diff --git a/Application/Dopamine/Dependencies/libfragmentzip.a b/Application/Dopamine/Dependencies/libfragmentzip.a deleted file mode 100644 index cc54b1a23..000000000 Binary files a/Application/Dopamine/Dependencies/libfragmentzip.a and /dev/null differ diff --git a/Application/Dopamine/Dependencies/libgrabkernel.a b/Application/Dopamine/Dependencies/libgrabkernel.a deleted file mode 100644 index 0557545ca..000000000 Binary files a/Application/Dopamine/Dependencies/libgrabkernel.a and /dev/null differ diff --git a/Application/Dopamine/Dependencies/libgrabkernel2.a b/Application/Dopamine/Dependencies/libgrabkernel2.a new file mode 100644 index 000000000..29727feaa Binary files /dev/null and b/Application/Dopamine/Dependencies/libgrabkernel2.a differ diff --git a/Application/Dopamine/Dependencies/libpartial.a b/Application/Dopamine/Dependencies/libpartial.a new file mode 100644 index 000000000..ed8f0373f Binary files /dev/null and b/Application/Dopamine/Dependencies/libpartial.a differ diff --git a/Application/Dopamine/Jailbreak/DOEnvironmentManager.m b/Application/Dopamine/Jailbreak/DOEnvironmentManager.m index 46187adc3..70365d85c 100644 --- a/Application/Dopamine/Jailbreak/DOEnvironmentManager.m +++ b/Application/Dopamine/Jailbreak/DOEnvironmentManager.m @@ -9,7 +9,7 @@ #import #import -#import +#import #import #import #import @@ -539,7 +539,7 @@ - (NSString *)accessibleKernelPath [[DOUIManager sharedInstance] sendLog:@"Downloading Kernel" debug:NO]; NSString *kernelcachePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/kernelcache"]; if (![[NSFileManager defaultManager] fileExistsAtPath:kernelcachePath]) { - if (grabkernel((char *)kernelcachePath.fileSystemRepresentation, 0) != 0) return nil; + if (grab_kernelcache(kernelcachePath) == false) return nil; } return kernelcachePath; } diff --git a/Application/Dopamine/Jailbreak/DOExploitManager.m b/Application/Dopamine/Jailbreak/DOExploitManager.m index d00693229..8620d7db2 100644 --- a/Application/Dopamine/Jailbreak/DOExploitManager.m +++ b/Application/Dopamine/Jailbreak/DOExploitManager.m @@ -10,8 +10,6 @@ #import "DOEnvironmentManager.h" #import "DOPreferenceManager.h" -#import - #define FORCE_PAC_BYPASS 0 @implementation DOExploitManager diff --git a/BaseBin/_external/include/libgrabkernel/libgrabkernel.h b/BaseBin/_external/include/libgrabkernel/libgrabkernel.h deleted file mode 100644 index 1947d0783..000000000 --- a/BaseBin/_external/include/libgrabkernel/libgrabkernel.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// libgrabkernel.h -// libgrabkernel -// -// Created by tihmstar on 31.01.19. -// Copyright © 2019 tihmstar. All rights reserved. -// - -#ifndef libgrabkernel_h -#define libgrabkernel_h - -#include - -const char* libgrabkernel_version(void); -int grabkernel(char *downloadPath, int isResearchKernel); - - -#endif /* libgrabkernel_h */ diff --git a/BaseBin/_external/include/libgrabkernel2/libgrabkernel2.h b/BaseBin/_external/include/libgrabkernel2/libgrabkernel2.h new file mode 100644 index 000000000..91d18d6d4 --- /dev/null +++ b/BaseBin/_external/include/libgrabkernel2/libgrabkernel2.h @@ -0,0 +1,20 @@ +// +// grabkernel.h +// libgrabkernel2 +// +// Created by Alfie on 14/02/2024. +// + +#ifndef grabkernel_h +#define grabkernel_h + +#include + +bool download_kernelcache(NSString *zipURL, bool isOTA, NSString *outPath); +bool grab_kernelcache(NSString *outPath); + +// libgrabkernel compatibility shim +// Note that research kernel grabbing is not currently supported +int grabkernel(char *downloadPath, int isResearchKernel); + +#endif /* grabkernel_h */