Repository navigation
Conversation
The manager stores the System Framework scope as `system`, but the libxposed API, the modules asking for a scope through it, and the CLI all use `android` for the same target - and the rows were stored verbatim. The one query that serves system_server only matched `system`, so a module scoped through any spelling but the manager's was silently absent from the module list: nothing loaded into system_server, onSystemServerStarting dispatched over an empty set, and the modules log showed no system_server entries at all. That is the never-dispatched half of JingMatrix#1101, and it reproduced on clean boot cycles because it was not a race. Writes are normalized at the storage boundary (setModuleScope, the scope request approval, and getModuleScope's read-back), the system_server reader accepts both spellings (deduped, since both rows can exist), removal clears both, and the cache expansion treats the alias the same way. The unresolved apkPath skip in getModulesForSystemServer also stops being silent. Verified on HyperOS 2.0 (Android 15, beryl): with a scope row stored as `android`, system_server now loads the module and dispatches onSystemServerStarting on the first soft reboot after this change. Fixes the dispatch half of JingMatrix#1101.
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.
Standalone half of the investigation behind #1101, following the classification there into #1061 and the guidance comment ("for cli usage, use the name
system... still a history legacy we have to bear for a while"). The daemon shadow-escape half is in #1103 and does not depend on this.The trap today
The framework scope answers to two spellings depending on where the row comes from:
system(ScopeViewModel.SYSTEM_FRAMEWORK_PACKAGE);vector-cli scope add <module> android/0) all useandroid;ModuleDatabase.systemServerModuleRows()— the one query that serves system_server — matches onlyapp_pkg_name = 'system'.So a row written under the
androidspelling matches no reader at all:getModules()returns an empty list to system_server, nothing loads,onSystemServerStartingdispatches over an empty set, and no log anywhere says why — on every clean boot, because it is not a race. That is what #1061/#1101 hit: the row on that device was written through the CLI with the spelling the libxposed API itself uses.This PR does not change the documented guidance —
systemvia CLI andsystem_serverin the UI keep working exactly as before — it makes the legacy spelling stop being a silent failure: writes are normalized at the storage boundary (setModuleScope, the libxposed scope-request approval,getModuleScope's read-back), the system_server reader accepts both spellings (deduped, since both rows can exist), removal clears both, and the cache expansion treats the alias the same way. The unresolved-apkPathskip ingetModulesForSystemServeralso logs now instead of silently dropping a module.Verification (HyperOS 2.0 / Android 15, beryl, KernelSU + Zygisk Next)
Built from this branch (debug) and deployed with the scope row left stored as
android(no other changes):Loading module io.github.varma322.gpssetter ... successfully.under uid 1000/pid of system_server;onSystemServerStartingdispatches (activeModules=1) and the module's hooks install;dumpsys locationshows provider-level (gps + fused) spoofing at the module's configured coordinates — previouslylast location=nullthroughout;The classloader-capture chain the original reports traced is healthy on this ROM — an instrumented build showed
handleSystemServerProcess's post-hook finding a valid context classloader and the hooks firing as designed; the empty module list was the whole story.Happy to drop this if you would rather keep the legacy as documented-only.