Run Android ARM64 VR APKs on Apple Vision Pro
Developers can now run Android ARM64 VR APKs on Apple Vision Pro, eliminating the need for just-in-time (JIT) compilation. klepton-ld, a translation tool, converts Android .so libraries into loadable Apple .dylib and .framework libraries, which are then integrated into the Klepton runtime. The software currently concentrates on Java-based applications, excluding those with Android Runtime (ART) or Java Virtual Machine (JVM).
For graphics rendering, GLES 3.2 is translated into a customized ANGLE GLES 3.0 (with a Metal backend), while Vulkan is converted to MoltenVK.
Klepton addresses the issue of Apple and macOS reserving x18, a practice still observed in some older Android applications. In these instances, klepton-ld patches x18 to utilize per-library TLS slots during context switches. The software also possesses the capability to load and patch .so files at runtime using mmap, but this feature is primarily useful on macOS, where JIT execution is permitted.
Despite its impressive capabilities, klepton-ld has certain limitations. Some applications may still require JIT for scripting runtimes that expect it, such as LuaJIT or V8. Moreover, potential roadblocks include anticheat measures, JIT mmaping, or other obstacles. The current build functions effectively on both macOS and visionOS, with minor-to-no graphical issues. However, the project is currently on hiatus due to these challenges, such as anticheat, JIT mmaping, or other complications.
Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.