Skip to content

Survive a failed injection, and quieten the scope logs - #826

Merged
JingMatrix merged 2 commits into
masterfrom
scope-log-wording
Aug 1, 2026
Merged

Survive a failed injection, and quieten the scope logs#826
JingMatrix merged 2 commits into
masterfrom
scope-log-wording

Conversation

@JingMatrix

@JingMatrixJingMatrix commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Two minor fixes, unrelated to each other.

A process no module has in scope produced three log lines about it, and one called the daemon's ordinary refusal a failure. The duplicate in ipc_bridge.cpp goes; the two in module.cpp now say what happened. The wording stops short of "out of scope" because the zygisk side cannot tell: BridgeService.onTransact also returns false when the daemon binder has not arrived yet, or when the process is already registered. The daemon logs the reason itself.

sendToBridge leaves the main thread at euid 1000, and the statement after it read the verbose-log preference out of the config database, which sits under a directory only root can enter. That normally works because a binder thread opens and caches the handle during specialization first, but only when the injection succeeded. When it failed nothing had, and the daemon died on the preference read instead of carrying on — the second half of the crash in #744 and #773. Reading it before sendToBridge leaves the check where it was and does the open while we still have root.

`sendToBridge` leaves the main thread at euid 1000, and the statement
after it opened the config database, which sits under a directory only
root can enter. It normally works because a binder thread opens and
caches the handle during specialization first, but that only happens
when the injection succeeded; when it failed the daemon died on the
preference read instead of carrying on.
@JingMatrixJingMatrix changed the title Stop calling an out-of-scope process an injection failureQuieten the out-of-scope logs, and read a preference before we drop rootJul 31, 2026
@JingMatrixJingMatrix changed the title Quieten the out-of-scope logs, and read a preference before we drop rootKeep the daemon alive after a failed injection, and quieten the scope logsAug 1, 2026
@JingMatrixJingMatrix changed the title Keep the daemon alive after a failed injection, and quieten the scope logsKeep the daemon alive after a failed injectionAug 1, 2026
@JingMatrixJingMatrix changed the title Keep the daemon alive after a failed injectionSurvive a failed injection, and quieten the scope logsAug 1, 2026
@JingMatrix
JingMatrix merged commit 28daecf into masterAug 1, 2026
1 check passed
@JingMatrix
JingMatrix deleted the scope-log-wording branch August 7, 2026 19:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@JingMatrix