我正在尝试通过越狱 iPhone 应用程序中的 C system() 函数进行调用,但它们似乎无法正常工作。我知道这是可能的,因为 Cydia.app 的源代码可以做到这一点,但是当我尝试它时,它什么也没做。
我设置了一个简单的测试,它在 Mac 上运行良好,但在设备上返回为空:
system("cd /bin && ls > /tmp/output.txt");
NSLog([NSString stringWithContentsOfFile:@"/tmp/output.txt" usedEncoding:nil error:nil]);
我通过 XCode 正常安装它。我想我可能需要将它安装在 /Applications 中,但是当我尝试 SSH 并将其安装在 /Applications 中时,它显示在 SpringBoard 中,但拒绝启动。