gpt4 book ai didi

ios - 在 iOS 上执行 Unix/任意命令

转载 作者:可可西里 更新时间:2023-11-01 01:07:19 25 4
gpt4 key购买 nike

这不是用于生产应用程序 - 我只是为了好玩而修补它(在设备上,而不是模拟器上)。

是否有任何机制可以在 iOS 上执行任意二进制文件?比如说,ls

我试过 posix_spawn(),但它总是返回状态 1

system() 甚至没有编译,它失败了:'system' is unavailable: not available on iOS

fork() 同样是不允许的

我意识到这是一个远景,但我有几个(本地/个人)项目是作为预编译的 ARM 二进制文件编写的,我很想在我的 iPad 上使用它们。 (另外,这只是一个有趣的实验。)

旁注:我已经很多年没有越狱过 iOS 设备了,我希望避免越狱 - 如果 iOS 无法做到以上几点,我会叹息并继续前进。

最佳答案

有一个项目叫做 Linux shell for iOS 在 GitHub 上使用 usermode x86 仿真和 syscall 转换获得在 iOS 上运行的 Linux shell。

You'll need these things to build the project:

  • Python 3
  • Ninja
  • Yarn (only when building for iOS)
  • Meson (pip install meson)
  • Clang and LLD (on mac, brew install llvm, on linux, sudo apt install clang lld or sudo pacman -S clang lld or whatever)
  • sqlite3 (this is so common it may already be installed on linux and is definitely already installed on mac. if not, do something like sudo apt install libsqlite3-dev)

我在 this 中找到了这个 GitHub 链接发布。

附言我很高兴它正在运行。

enter image description here

关于ios - 在 iOS 上执行 Unix/任意命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55868892/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com