Added and some fixes - #141
Closed
xm999n wants to merge 8 commits into
Closed
Conversation
Owner
|
Thanks for your interest in contributing. It seems to me that only the SELinux leak bypass worth a technical discussion. There are two issues in your solution:
Due to these problems, it is better that you implement the hiding strategy as a Zygisk module. |
# Conflicts: # loader/src/common/daemon.cpp
xm999n
force-pushed
the
master
branch
2 times, most recently
from
August 4, 2026 16:01
1d2ef16 to
f70eb8a
Compare
added 2 commits
August 6, 2026 20:19
Hook libcore.io.Linux.write in app_zygote-derived processes and fake EINVAL when the payload is exactly 'u:r:adbroot:s0', forcing the detector's i.c() fallback path to return false so 'found adb_root' is never reported. Fast path is a single integer compare per Os.write.
The previous hook called FindClass/GetMethodID on every matching Os.write,
which dominates the cost of the write and can contend on the class-loading
lock. app_zygote's ZygotePreload issues many Os.write calls during init;
under contention this stalled init past the detector's 5s
bindIsolatedService timeout, surfacing as 'Service connection timedout,
app zygote crashed?'.
Fixes:
- Resolve ErrnoException class + ctor ONCE in hook_os_write and pin as
GlobalRefs (cached in atomics), valid for process lifetime and across
the zygote->app_zygote fork.
- Remove FindClass('[B') + IsInstanceOf on the hot path: writeBytes'
Object arg is, by libcore.io.Linux contract, always a byte[].
- Add thread_local reentrancy guard as cheap insurance against any
indirect Os.write triggered by JNI internals.
Hot path now: one length dispatch + (only on the rare 15/33-byte match)
a bounded GetByteArrayRegion + memcmp. No FindClass, no class lock.
Owner
|
KernelSU has integrated such hiding into its source. NeoZygisk shouldn't take the burden of fixing this leakage. |
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.
No description provided.