Skip to content

Commit

Permalink
better detection of code injection platform
Browse files Browse the repository at this point in the history
  • Loading branch information
jjolano committed Jul 28, 2019
1 parent 96ed227 commit 159be51
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tweak.xm
Original file line number Diff line number Diff line change
Expand Up @@ -3420,7 +3420,8 @@ static ssize_t hook_readlinkat(int fd, const char *path, char *buf, size_t bufsi
[_shadow setUseTweakCompatibilityMode:[prefs_tweakcompat boolForKey:bundleIdentifier] ? NO : YES];

// Disable inject compatibility if we are using Substitute.
BOOL isSubstitute = [[NSFileManager defaultManager] fileExistsAtPath:@"/usr/lib/libsubstitute.dylib"];
NSFileManager *fm = [NSFileManager defaultManager];
BOOL isSubstitute = ([fm fileExistsAtPath:@"/usr/lib/libsubstitute.dylib"] && ![fm fileExistsAtPath:@"/usr/lib/substrate"]);

if(isSubstitute) {
[_shadow setUseInjectCompatibilityMode:NO];
Expand Down

0 comments on commit 159be51

Please sign in to comment.