Skip to content

Commit 9b6180d

Browse files
committed
feat: supports ios 18
Signed-off-by: 82Flex <[email protected]>
1 parent 330938c commit 9b6180d

File tree

8 files changed

+82
-2
lines changed

8 files changed

+82
-2
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export PACKAGE_VERSION := 1.1.1
1+
export PACKAGE_VERSION := 1.1.2
22

33
ARCHS := arm64 arm64e
44
ifeq ($(THEOS_PACKAGE_SCHEME),)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This jailbreak tweak allows you to “click-to-run” (and debug) app directly f
66

77
Which makes it super easy to develop TrollStore based system apps, or to test your own apps without the need to sign them with a developer certificate.
88

9-
Tested on iOS 15.0/15.4/16.2/16.4/16.5.1/16.7.10 with palera1n, Dopamine and Dopamine (RootHide) jailbreaks. TrollStore is required.
9+
Tested on iOS 15.0/15.4/16.2/16.4/16.5.1/16.7.10/18.3 with palera1n, Dopamine and Dopamine (RootHide) jailbreaks. TrollStore is required.
1010

1111
https://github.com/user-attachments/assets/36af81b7-724b-4fb7-b29e-0e71235c2edd
1212

XcodeAnyTroll.xm

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,53 @@ static const char *BlockSig(id blockObj)
182182

183183
%hook MIClientConnection
184184

185+
/* iOS 18.2 */
186+
- (void)_installURL:(NSURL *)url identity:(id)identity targetingDomain:(NSUInteger)domain options:(MIInstallOptions *)options operationType:(NSUInteger)operationType completion:(void (^)(BOOL, NSArray *, id, NSError *))completion {
187+
HBLogDebug(@TAG "installURL:%@ withOptions:%@", url, options);
188+
189+
if (![options isKindOfClass:%c(MIInstallOptions)] || ![options respondsToSelector:@selector(isDeveloperInstall)] || ![options isDeveloperInstall]) {
190+
HBLogDebug(@TAG "Not a developer install, skipping custom handling");
191+
%orig;
192+
return;
193+
}
194+
195+
void (^replCompletion)(BOOL, NSArray *, id, NSError *) = ^(BOOL succeed, NSArray *appList, id recordPromise, NSError *error) {
196+
HBLogDebug(@TAG "completion called with recordPromise:%@ error:%@", recordPromise, error);
197+
if (!completion) {
198+
return;
199+
}
200+
201+
if (gPackagePath && gPackageIdentifier && ([[error description] containsString:@"0xe800801c"] || [[error description] containsString:@"0xe8008001"])) {
202+
NSError *error = nil;
203+
NSDictionary *retVal = nil;
204+
205+
retVal = [GetXpcMessagingCenter() sendMessageAndReceiveReplyName:@"InstallPackage" userInfo:@{
206+
@"PackagePath": gPackagePath,
207+
@"PackageIdentifier": gPackageIdentifier,
208+
} error:&error];
209+
if (error) {
210+
HBLogDebug(@TAG "XPC error occurred: %@", error);
211+
completion(succeed, appList, recordPromise, error);
212+
return;
213+
}
214+
215+
HBLogDebug(@TAG "XPC reply received: %@", retVal);
216+
217+
LSApplicationProxy *appProxy = [LSApplicationProxy applicationProxyForIdentifier:gPackageIdentifier];
218+
LSRecordPromise *recordPromise = [[%c(LSRecordPromise) alloc] initWithRecord:appProxy.correspondingApplicationRecord error:nil];
219+
220+
/* LSRecordPromise is not properly constructed in some cases, still need some work here. */
221+
222+
completion(YES, retVal[@"InstalledAppInfoArray"], gRecordPromise ?: recordPromise, nil);
223+
return;
224+
}
225+
226+
completion(succeed, appList, recordPromise, error);
227+
};
228+
229+
%orig(url, identity, domain, options, operationType, replCompletion);
230+
}
231+
185232
/* iOS 16.2 */
186233
- (void)_installURL:(NSURL *)url identity:(id)identity targetingDomain:(NSUInteger)domain options:(MIInstallOptions *)options completion:(void (^)(BOOL, NSArray *, id, NSError *))completion {
187234
HBLogDebug(@TAG "installURL:%@ withOptions:%@", url, options);

devkit/env/bootstrap.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
export THEOS="$HOME/theos-roothide"
4+
export THEOS_PACKAGE_SCHEME=roothide
5+
export THEOS_DEVICE_IP=127.0.0.1
6+
export THEOS_DEVICE_PORT=58422
7+
export THEBOOTSTRAP=1

devkit/env/root.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
export THEOS="$HOME/theos"
4+
export THEOS_PACKAGE_SCHEME=
5+
export THEOS_DEVICE_IP=127.0.0.1
6+
export THEOS_DEVICE_PORT=58422
7+
export THEBOOTSTRAP=

devkit/env/roothide.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
export THEOS="$HOME/theos-roothide"
4+
export THEOS_PACKAGE_SCHEME=roothide
5+
export THEOS_DEVICE_IP=127.0.0.1
6+
export THEOS_DEVICE_PORT=58422
7+
export THEBOOTSTRAP=

devkit/env/rootless.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
export THEOS="$HOME/theos"
4+
export THEOS_PACKAGE_SCHEME=rootless
5+
export THEOS_DEVICE_IP=127.0.0.1
6+
export THEOS_DEVICE_PORT=58422
7+
export THEBOOTSTRAP=

devkit/standardize-entitlements.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
cd "$(dirname "$0")"/.. || exit
4+
5+
plutil -convert xml1 serialcomm/entitlements.plist

0 commit comments

Comments
 (0)