From: Jay Freeman (saurik) Date: Fri, 22 Jul 2016 09:09:04 +0000 (-0700) Subject: On iOS 9.2+ use "best effort" Substrate extension. X-Git-Tag: v1.2.0~1 X-Git-Url: https://git.saurik.com/patcyh.git/commitdiff_plain/8cfcde328b305be8dd815cdae14b96d5c0555620 On iOS 9.2+ use "best effort" Substrate extension. --- diff --git a/extrainst_.mm b/extrainst_.mm index fab3c6e..a4ccef2 100644 --- a/extrainst_.mm +++ b/extrainst_.mm @@ -37,10 +37,12 @@ int main(int argc, const char *argv[]) { NSAutoreleasePool *pool([[NSAutoreleasePool alloc] init]); - if (!PatchLaunch(kCFCoreFoundationVersionNumber < 1200, false)) + bool modern(kCFCoreFoundationVersionNumber > 1242); + + if (!PatchLaunch(modern || kCFCoreFoundationVersionNumber < 1200, false)) return 1; - if (!PatchInstall(false, false)) + if (!PatchInstall(modern, false)) return 1; [pool release]; diff --git a/makefile b/makefile index dca5f8e..7ebd9c0 100644 --- a/makefile +++ b/makefile @@ -22,6 +22,9 @@ lib%.dylib: %.mm package: all $(control) sudo rm -rf _ + mkdir -p _/Library/MobileSubstrate/DynamicLibraries + cp -a patcyh.plist _/Library/MobileSubstrate/DynamicLibraries + ln -s /usr/lib/libpatcyh.dylib _/Library/MobileSubstrate/DynamicLibraries/patcyh.dylib mkdir -p _/usr/lib cp -a $(library) _/usr/lib mkdir -p _/DEBIAN diff --git a/patcyh.plist b/patcyh.plist new file mode 100644 index 0000000..df3d1b8 --- /dev/null +++ b/patcyh.plist @@ -0,0 +1,4 @@ +Filter = { + Executables = ("lsd", "installd"); + Mode = "Any"; +};