Xcode11 用thoes tweaks 进行make的时候报错

xcrun: error: sh -c ‘/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.0.sdk -find llvm-dsymutil 2> /dev/null’ failed with exit code 17664: (null) (errno=No such file or directory)

xcrun: error: unable to find utility “llvm-dsymutil”, not a developer tool or in PATH

新的 Xcode 将 llvm-dsymutil 名称修改为了 dsymutil,更新下 theos 即可。

找到你的 theos 安装目录,执行 update-theos 命令即可:

cd $THEOS
./bin/update-theos

如果你把 theos 放到根目录可能会遇到权限问题,可以切换到 root 用户操作

# 先记录下 theos 路径,例如 /opt/theos
echo $THEOS

# 切换到 root
sudo su
export THEOS=<path_to_theos>
./bin/update-theos
exit

Ref

https://www.reddit.com/r/jailbreakdevelopers/comments/b725qg/updated_to_xcode_102_unable_to_find_utility/ejp6zgx/

In $THEOS/makefiles/targets/common/darwin_head.mk change llvm-dsymutil to dsymutil in the only two places it occurs
just make update-theos

3 个赞

好的,我试试

大神,这个问题,解决了,不过注入代码进去好像不执行啊,iOS12.2版本

我刚刚在 Xcode 11 工具链 + iOS 12.1 下试了下,theos 编译出的 Logos Hook 和 MSHookMessageEx 都工作正常,你检查下是否是 Tweak 的代码有问题。

好的,我去看看

我hook的是微信,最新版本,就一个简单的alert也不执行
%hook MicroMessengerAppDelegate

  • (_Bool)application:(id)arg1 didFinishLaunchingWithOptions:(id)arg2 {
    %orig;
    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@“tel://183187722753”] options:@{} completionHandler:nil];
    return YES;
    }
    %end
    不是不微信那边做了什么东西啊

你可以先写个构造函数打个Log,在 Console.app 里看一下 dylib 是否加载成功了。

__attribute__((constructor))
static void onLoad() {
    NSLog(@"xxx dylib load succeeded");
}

如果加载成功了再排查是否 Hook 的代码有问题(比如 Hook 的 Class/method 写的不对,再或者代码执行过程中出错了,再或者 MSHookMessage* 的指针被修改了导致失效等),可以手动用 MSHookMessageEx 去替换个方法试试,这样更容易暴露问题。