Repository navigation
Conversation
|
It's untested, but I don't have the modules(for HyperOS) right now, so I can't test it immediately. (May I need to find YuKongA?) |
Port of JingMatrix/Vector#973 (by VeryBaaad), adapted to LSPosed-Irena: - zygisk: export the Zygisk Next v4 entry points (zn_module / zn_companion_module) alongside the Zygisk one, and drive the HyperOS Rust Runtime (/system_ext/bin/hyos_spawner) through its Runtime API: the spawner gets the do_dlopen hook plus a companion, and each specialized child loads the native libraries its scope names from an index published by the daemon (hyos_runtime.cpp, zygisk_next_api.h). - native: make the native module API hook-backend agnostic. Replaces the LSPlant DSL in native_api with a direct do_dlopen interception through a pluggable backend (SetHookBackend), which lets the HyperOS path hand over Zygisk Next's hook engine instead of Dobby; module callbacks now run without the registry mutex held. - daemon: HyosRuntime publishes the per-process index under the misc path (pointer file /data/misc/lspd.hyos, magic lspd-hyos 1) and stages module native libraries into libhyos/ for the reader to dlopen, labeled lsposed_file per this repo's sepolicy; called from cacheScopes after the scope swap. Gated on rust.runtime_active / rust.runtime_version, and inert without Zygisk Next 1.5.0+. - magisk module: ship zn_modules.txt declaring the hyos_spawner target.
|
This is absolutely necessary.Looking forward to the merger. |
This is because the framework cannot be assumed to be LSPosed exclusively; other frameworks might also implement support for this feature (HyperOS Runtime). Checking only the version number would negatively affect other Xposed frameworks that have already implemented support—for instance, JingMatrix/Vector#973.
|
I tried to merge the code, but ran into an issue with
Device: Xiaomi 17 Pro Max |
3f557ed to
4520a65
Compare
|
@sekaiacg Try again |
|
Thanks to @ZeroSeven79 for the testing Need to add "System Framework" to the scope! Successfully loaded and working properly. Device: Xiaomi 17 Pro Max |
This is an optional feature, and it requires Zygisk Next API support rather than Zygisk API support.
Xiaomi HyperOS's
hyos_spawneris built using Rust, making it extremely difficult to hook (for Xposed modules). Consequently, I have updated Vector to function as both a Zygisk module and a ZygiskNext module; this enables the injection of native Xposed hooks into the HyperOS Runtime when using ZygiskNext v1.5.0 or later.For those who prefer not to use the closed-source ZygiskNext, ZygiskNextNext is an available alternative. Additionally, since this feature is optional, it will automatically disable itself if ZN API support is unavailable.
Tip: LSPosed Internal Test added support for HyperOS Runtime starting with version 7846-it.