[GH-ISSUE #30] Without JIT #23

Closed
opened 2026-03-03 15:29:47 +03:00 by kerem · 12 comments
Owner

Originally created by @ghost on GitHub (Feb 5, 2024).
Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/30

Via https://github.com/61bcdefg/unicorn-tcti, we can run arm64 machine code without JIT

Could you try to use this to make LiveContainer able to run apps without JIT? (There are already commercial applications that use a similar way to run other apps within an app without jailbreaking and JIT)

Originally created by @ghost on GitHub (Feb 5, 2024). Original GitHub issue: https://github.com/LiveContainer/LiveContainer/issues/30 Via [https://github.com/61bcdefg/unicorn-tcti](https://github.com/61bcdefg/unicorn-tcti), we can run arm64 machine code without JIT Could you try to use this to make LiveContainer able to run apps without JIT? (There are already commercial applications that use a similar way to run other apps within an app without jailbreaking and JIT)
kerem closed this issue 2026-03-03 15:29:47 +03:00
Author
Owner

@ghost commented on GitHub (Feb 6, 2024):

Something can reference https://github.com/zhkl0228/unidbg

<!-- gh-comment-id:1928597659 --> @ghost commented on GitHub (Feb 6, 2024): Something can reference [https://github.com/zhkl0228/unidbg](https://github.com/zhkl0228/unidbg)
Author
Owner

@khanhduytran0 commented on GitHub (Feb 6, 2024):

Looks interesting, but I’m not sure how things like callback from UIKit/GCD block works

<!-- gh-comment-id:1928603723 --> @khanhduytran0 commented on GitHub (Feb 6, 2024): Looks interesting, but I’m not sure how things like callback from UIKit/GCD block works
Author
Owner

@ghost commented on GitHub (Feb 6, 2024):

The above project simulates all the required system framework(is has a self-implemented macho loader), so there is no need to worry about this, but this makes the UI unusable.

<!-- gh-comment-id:1928907058 --> @ghost commented on GitHub (Feb 6, 2024): The above project simulates all the required system framework(is has a self-implemented macho loader), so there is no need to worry about this, but this makes the UI unusable.
Author
Owner

@ghost commented on GitHub (Feb 6, 2024):

Maybe for calls to special api functions like UIKit, we can check when unicorn is executed and convert it to calling functions in the real framework, but that would be a huge work

<!-- gh-comment-id:1928910677 --> @ghost commented on GitHub (Feb 6, 2024): Maybe for calls to special api functions like UIKit, we can check when unicorn is executed and convert it to calling functions in the real framework, but that would be a huge work
Author
Owner

@khanhduytran0 commented on GitHub (Feb 6, 2024):

Yeah I see, but I need complete API passthrough for app to work with maximum compatibility. Also, LiveContainer doesn’t need actual Mach-O loader, since it patches dyld instead. Might be need to run 32bit apps, but I’m not sure how to deal with 4GB address space limit.

<!-- gh-comment-id:1928911152 --> @khanhduytran0 commented on GitHub (Feb 6, 2024): Yeah I see, but I need complete API passthrough for app to work with maximum compatibility. Also, LiveContainer doesn’t need actual Mach-O loader, since it patches dyld instead. Might be need to run 32bit apps, but I’m not sure how to deal with 4GB address space limit.
Author
Owner

@ghost commented on GitHub (Feb 6, 2024):

I think a complete API passthrough is almost impossible to achieve...

<!-- gh-comment-id:1928917826 --> @ghost commented on GitHub (Feb 6, 2024): I think a complete API passthrough is almost impossible to achieve...
Author
Owner

@khanhduytran0 commented on GitHub (Feb 6, 2024):

I think it is possible using shims. For example, aah also uses unicorn to run arm64 iOS app inside x64 simulator

<!-- gh-comment-id:1928921616 --> @khanhduytran0 commented on GitHub (Feb 6, 2024): I think it is possible using shims. For example, [aah](https://github.com/zydeco/aah) also uses unicorn to run arm64 iOS app inside x64 simulator
Author
Owner

@ghost commented on GitHub (Feb 6, 2024):

Looks nice, that might actually be possible

<!-- gh-comment-id:1928932572 --> @ghost commented on GitHub (Feb 6, 2024): Looks nice, that might actually be possible
Author
Owner

@ghost commented on GitHub (Feb 7, 2024):

@khanhduytran0 Are there any plans? After some modifications to aah, I successfully ran aah with unicorn-tcti natively on Apple Silicon Mac. So I think this works for iOS as well, LiveContainer without JIT is truely possible, even though the performance will be bad

<!-- gh-comment-id:1931988199 --> @ghost commented on GitHub (Feb 7, 2024): @khanhduytran0 Are there any plans? After [some modifications to aah](https://github.com/61bcdefg/aah), I successfully ran aah with unicorn-tcti natively on Apple Silicon Mac. So I think this works for iOS as well, LiveContainer without JIT is truely possible, even though the performance will be bad
Author
Owner

@ghost commented on GitHub (Feb 8, 2024):

Also, LiveContainer doesn’t need actual Mach-O loader, since it patches dyld instead.

But the current way to patch dyld was depends on JIT, perhaps ellekit's JITLessHook could be used instead.

<!-- gh-comment-id:1933983728 --> @ghost commented on GitHub (Feb 8, 2024): > Also, LiveContainer doesn’t need actual Mach-O loader, since it patches dyld instead. But the current way to patch dyld was depends on JIT, perhaps [ellekit's JITLessHook](https://github.com/evelyneee/ellekit/blob/main/ellekitc/JITLess.c) could be used instead.
Author
Owner

@tealbathingsuit commented on GitHub (Apr 1, 2024):

JITLessHook will work here, since it seems you only hook 4 functions

<!-- gh-comment-id:2030789496 --> @tealbathingsuit commented on GitHub (Apr 1, 2024): JITLessHook will work here, since it seems you only hook 4 functions
Author
Owner

@ghost commented on GitHub (Apr 19, 2024):

Looks like a better solution has been achieved, close as completed

<!-- gh-comment-id:2066599261 --> @ghost commented on GitHub (Apr 19, 2024): Looks like a better solution has been achieved, close as completed
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LiveContainer#23
No description provided.