Repository navigation
Conversation
…orer
action.sh: the injection path needs ${INJECTED_PACKAGE_NAME} to host a 2D
activity and to receive the injected manager dex, neither of which holds in
every environment. When the manager has been installed as a regular package
-- manager.apk ships inside the module for exactly that -- launch its
activity directly and leave the injection path as the fallback.
service.sh: "unshare --propagation slave -m" is GNU util-linux syntax;
toybox builds that implement only a subset reject the flag outright, which
leaves the daemon dead with nothing anywhere to say so. Probe the flag with
a throwaway command and fall back to "unshare -m", then to running the
daemon without a namespace at all.
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.
What
Two robustness fixes in the Magisk module scripts, both for environments that are not a conventional phone. Each keeps today's behaviour as the first choice and only falls back when the environment cannot support it.
zygisk/module/action.sh— prefer the installed managerThe action button currently only knows the injection path: hand the intent to
${INJECTED_PACKAGE_NAME}and let the Zygisk-injected manager answer it. That needs the shell process to host a 2D activity and to receive the injected manager dex. Neither is guaranteed everywhere: some systems never let the shell host an activity at all, and dynamic code loading restrictions can block the dex (#805 fixed one such case on GrapheneOS). Where the injection path cannot work, the action button is a dead end — even thoughmanager.apkships inside the module and #809 added a standalone install for exactly this situation.When the manager has been installed as a regular package, launch its activity directly instead. If it has not, the injection path runs unchanged.
zygisk/module/service.sh— start the daemon where unshare is poorerunshare --propagation slave -mis GNU util-linux syntax. Android ships toybox, and toybox builds that implement only a subset of util-linux reject the flag outright:The daemon then never starts, and nothing says so:
service.shhas no error path, and the failure only shows up as every Xposed module silently doing nothing. Probe the flag with a throwawaytrueand fall back tounshare -m, then to running the daemon without a namespace. The full invocation still runs first wherever it is supported.Testing
Verified on a PICO 4 (Android 10) VR headset, where
unshare --propagationis rejected and the shell cannot host the manager:unshare --propagation slave -m trueexits 1 withUnknown option propagation;unshare -m trueexits 0. Killedvectord, ran the newservice.sh, and the daemon came back (VectorDaemon: Successfully injected Vector IPC binder for applications).manager.apkinstalled from the module, the action opensorg.matrix.vector.manager/.ui.MainActivitydirectly (force-stopped the manager, ran the action, the process returned). Without the package installed, the injection path still runs.Notes
pm installof the bundledmanager.apkis still a manual step there, and Give the manager ways in again, and name builds by where they came from #809's first-launch prompt lives inside the manager, so it cannot be reached either. Acustomize.shoffer at flash time would close that gap, but it is a bigger change than this PR should carry.