Start serial registration in early daemon initialization#648
Merged
JingMatrix merged 2 commits intomasterfrom Apr 9, 2026
Merged
Start serial registration in early daemon initialization#648JingMatrix merged 2 commits intomasterfrom
serial registration in early daemon initialization#648JingMatrix merged 2 commits intomasterfrom
Conversation
1 task
1 task
On some devices (e.g., Xiaomi Android 12 [Xiaomi/toco_ru/toco:12/RKQ1.210614.002/V13.0.4.0.SFNRUXM:user/release-keys]), the daemon takes longer to initialize, causing the Zygisk module in system_server to time out after the default 3 seconds while waiting for the proxy service. We address the race condition with the following changes: - Move proxy service registration (`SystemServerService.registerProxyService`) to the earliest possible phase in daemon initialization, before environmental setup and DEX preloading. - Increase the Zygisk IPC waiting retries in `ipc_bridge.cpp` from 3 to 10 seconds to ensure successful communication on slower ROMs. - Refactor `SystemServerService` into a singleton object. - Move `system_server` crash recovery and restart logic directly into `VectorDaemon.kt` to better manage retry states during reinjection. - Clean up variable usage and improve code comments to accurately reflect the proxy replacement lifecycle.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Xiaomi Android 12 [Xiaomi/toco_ru/toco:12/RKQ1.210614.002/V13.0.4.0.SFNRUXM:user/release-keys], it is observed that daemon is not started even the
zygiskmodule in system_server has been waiting for 3 seconds.We also increase the IPC waiting retries to ensure the communication.