Reputation: 32054
This is not for a production application - I'm just tinkering for the fun of it (on a device, not the simulator).
Is there any mechanism for executing arbitrary binaries on iOS? Say, ls
.
I've tried posix_spawn()
, but it always returns a status of 1
.
system()
doesn't even compile, it fails with: 'system' is unavailable: not available on iOS
fork()
is similarly not allowed
I realize it's a long-shot, but I have a couple (local/personal) projects that are written as pre-compiled ARM binaries and I'd love to have them available on my iPad. (Plus it's just a fun experiment.)
Sidenote: I haven't jailbroken an iOS device in years and I'm hoping to avoid it - if the above isn't possible with stock iOS, I'll just sigh and move on.
Upvotes: 2
Views: 306
Reputation: 58113
There's a project called Linux shell for iOS on GitHub to get a Linux shell running on iOS, using usermode x86
emulation and syscall
translation.
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)
I found this GitHub link in this post.
P.S. I'm glad it's running.
Upvotes: 2