Repository navigation
Closed as duplicate
Description
Environment
- Device: Redmi Note 14 5G (beryl, MT6855), HyperOS OS2.0.211.0.VOQCNXM, Android 15 (SDK 35), kernel 5.10.236-android12-9
- Root: KernelSU 3.3.1 (32680), LKM loaded post-boot
- Zygisk Next 1.5.3 (880-22a1bf5-release)
- Vector: v2.2 Debug (3080), manager v3.3.1
- Module:
io.github.varma322.gpssetterv0.4.1 (libxposed API 101), scoped toandroid/ user 0 (System Framework)
What works
- Vector framework injection into system_server succeeds on every cycle, including a fully clean hard-reboot + recovery cycle:
module.cpp:394 postServerSpecialize: Attempting injection into system_server. ipc_bridge.cpp:363 RequestManagerBinderFromSystemServer: Manager binder from system_server: ... Injected Vector framework into system_server. - Per-app injection works: legacy modules load in app processes (
VectorLegacyBridge Loading legacy module ...), libxposed in-process hooks in scoped apps work (verified end-to-end with a location hook in a scoped app).
What fails
- Modules scoped to
androidare never dispatchedonSystemServerStarting— across 4+ cycles, including clean ones. - The test module logs
"GPS Setter: Hooking system server (SDK 35)"as the first statement of itsonSystemServerStarting; this line appears zero times in main logcat,lspdverbose/modules/log.old logs — in any cycle. - The modules log shows only legacy-module loads in app processes; there is no system_server module entry at all, not even a failed attempt.
- Functional consequence: provider-level location spoofing never starts (
dumpsys location: gps/fused providerlast location=nullthroughout), while per-app scoping works fine.
Verified not a configuration problem
modules_config.db:modules.enabled = 1for the module;scopetable contains(module, android, 0).VectorConfigCachecache update / map swap observed right after the scope change.
Source-level findings (decompiled framework/vector.dex)
VectorLifecycleManager.dispatchSystemServerStartingexists and iteratesactiveModules, callingonSystemServerStartingper module — so the dispatcher itself is present.- Two silent no-log skip points in the chain that leads to it:
HandleSystemServerProcessHooker.intercept: afterchain.proceed(), it takesThread.currentThread().getContextClassLoader(); if that isnull, it silently does nothing (no log).StartBootstrapServicesHooker.intercept: dispatches onlyif (getSystemServerCL() != null)— anullclassloader silently skips the whole dispatch (no log).
- On this device the callback chain (
ZygoteInit.handleSystemServerProcess→SystemServer.startBootstrapServices) never reaches the dispatch. Since both skip points are silent, the failure cannot be located from logs alone.
Repro
- Install any libxposed module that overrides
onSystemServerStarting(e.g., a GPS Setter fork). - Enable it in Vector and add System Framework (
android) to its scope. - Reboot (soft reboot via
ksudor full reboot — both observed). - Result:
Injected Vector framework into system_serverappears, butonSystemServerStartingis never dispatched; no system_server module entries in the modules log.
Suggestion
Add logging (or surface an error in the modules log) at the two silent-skip points, and/or check whether ZygoteInit.handleSystemServerProcess hooking or Thread.currentThread().getContextClassLoader() behaves differently on HyperOS 2.0 / Android 15, so that systemServerCL is never captured on this ROM.
Secondary, off-topic observation for context only: during ksud soft-reboot, zn-daemon sometimes aborts with FORTIFY: pthread_mutex_lock called on a destroyed mutex (SIGABRT) which can leave two generations of zn-daemon/zn-nsdaemon alive; that makes the re-injection timing worse but the failure above also reproduces on fully clean cycles.
Metadata
Metadata
Assignees
Labels
No labels
Activity
McTr0 commentedon Nov 21, 2026
Follow-up: severity escalation — system_server boot loop on HyperOS 2.0 (Android 15)
After filing the original report I built the module from current master (
6f6b976,Vector-v2.2-40-Debug.zip, commit-count versionCode 40) and deployed it on the same device. The situation is more severe than "dispatch never happens": the device enters a system_server crash loop and cannot complete boot.Boot loop
system_serverdies every ~10 s with (from the crash buffer):sys.boot_completedstayed0for 38+ minutes; the device was unusable until the recovery steps below.dumpsys locationgps/fused providerlast location=nullthroughout — the original dispatch failure stands.New finding: /data/resource-cache tmpfs leak (global mount namespace)
service.shstarts the daemon asunshare --propagation slave -m "$MODDIR/daemon" ..., and the daemon wrapper script mountstmpfs -t tmpfs /data/resource-cache. On HyperOS 2.0,unshare(toybox) does not support--propagation:In some start paths the mount then lands in the global mount namespace. Observed on-device:
mountshowstmpfs on /data/resource-cacheon the global table, shadowing the real directory (RRO idmaps), surviving soft reboots and daemon restarts.umount /data/resource-cache+ zygote restart was required to break the boot loop (after which the device boots with the module effectively inactive).Suggestion: fail hard (or retry) when namespace isolation cannot be established, instead of letting the mount escape into the global namespace.
Other observations
Failed to inject VectorService into system_serverand then restarted system_server up to--system-server-max-retry=3times. HEAD source ("leaving it running") already improves this — confirmed present at 6f6b976. Good change.framework/vector.dexis preloaded into aSharedMemorysingleton held by the daemon for its lifetime: replacingframework/vector.dexon disk does nothing until the daemon is restarted. Worth documenting for people shipping debug framework dexes (I lost an hour to this).onSystemServerStartingdispatch. So the original report is not a race artifact.On-device recovery steps used (for reference)
vectord/zn-daemon/zn-nsdaemon-*(breaks injection) → zygote restart → boot completes with the module inactive.umount /data/resource-cache(removes the leaked tmpfs).ksud module disable zygisk_vectorto prevent recurrence.Happy to test patches or CI builds on this device.
[-]libxposed modules scoped to android are never dispatched onSystemServerStarting (framework injects into system_server but module loading never happens)[/-][+]libxposed modules scoped to android are never dispatched onSystemServerStarting; on HyperOS 2.0 (Android 15) android-scoped modules cause a system_server boot loop[/+]JingMatrix commentedon Nov 22, 2026
See #1061 (comment).
McTr0 commentedon Nov 22, 2026
Root-caused both symptoms, fixed in #1102. Summary of what the investigation on this device found:
The boot loop was the daemon's
/data/resource-cacheshadow escaping its mount namespace. With the shadow in the global namespace, a booting system_server loses the idmap behind thecom.google.android.overlay.modules.ext.services.cnoverlay, reads the un-overlaidconfig_servicesExtensionPackagebase value (android.ext.services, verified in framework-res; the only ExtServices on the image iscom.google.android.ext.servicesin the APEX), andgetRequiredServicesExtensionPackageLPrthrows every cycle. This is the same mechanism the Samsung discussion #1042 describes; it triggered here because isolation is not reliable in the script's execution environment (toybox 0.8.11unsharetakes no--propagation, and plainunshare -mintermittently returnsEPERMfrom the same root domain seconds apart). #1102 makes the start fail-safe: no private namespace → daemon starts unshadowed, never leaks, never refuses to start.The never-dispatched
onSystemServerStartingwas the scope storage, not the dispatch chain.config modules_config.dbon this device stored the framework scope row asapp_pkg_name='android'(the libxposed/CLI spelling, added viascope add ... android/0), whilesystemServerModuleRows()matched only'system'(the manager's spelling) — sogetModules()returned an empty list to system_server on every boot, cleanly, with nothing in any log. The classloader-capture chain the original report traced turned out to be healthy: an instrumented build showedhandleSystemServerProcess's post-hook finding a valid context classloader (PathClassLoader[...services.jar]) and the hooks firing as designed. #1102 normalizes the spelling at the storage boundary and accepts both in the readers.After deploying a build from #1102 (scope row left as
android, no other changes): first soft reboot boots cleanly with no PMS exception, the modules log gains the previously missingLoading module io.github.varma322.gpssetter ... successfullyentry under uid 1000, anddumpsys locationshows provider-level (gps + fused) spoofing working again —last locationat the module's configured coordinates instead ofnull.Thanks for the discussion pointers and the fast CI turnaround on this repo; happy to rework anything in the PR.