Skip to content

Add per-app ART inline hook compatibility mode - #921

Open
lzup333 wants to merge 3 commits into
JingMatrix:masterfrom
lzup333:master
Open

Add per-app ART inline hook compatibility mode#921
lzup333 wants to merge 3 commits into
JingMatrix:masterfrom
lzup333:master

Conversation

@lzup333

@lzup333 lzup333 commented Aug 17, 2026

Copy link
Copy Markdown

Summary

Adds a per-package switch to disable Vector's ART inline hooks in selected apps for compatibility (ART内联HOOK兼容模式 / 还原内联钩子).

Changes

  • native: art_inline_hook_cleanup.cpp + core/art_inline_hook_invalidation.h — a routine that invalidates recorded inline-hook targets after a process specialises.
  • zygisk: module.cpp records/forgets invalidation targets via MakeArtHookInitInfo() and runs InvalidateArtInlineHooksIfEnabled() after forkCommon; ipc_bridge adds ShouldInvalidateArtInlineHooks.
  • daemon: new InlineHookProcessPolicy, PreferenceStore hooks, FrameworkService transaction handler, ManagerService impl.
  • AIDL: IManagerService adds getInvalidateArtInlineHookPackages/setInvalidateArtInlineHooks (PROTOCOL_VERSION 1→2).
  • manager UI: per-app toggle screen, route, ViewModel, SystemStatus entry row, strings.

Verification

  • :manager, :daemon, and :zygisk (native, all 4 ABIs) compile; new native symbols are linked into libzygisk.so.
  • Release module zip builds successfully.

Adds a per-package switch to disable Vector's ART inline hooks in
selected apps for compatibility. A native routine invalidates any
recorded inline-hook targets after an app's process specialises, driven
by a new daemon preference and an AIDL method the manager toggles per
app (plus the Android system UI).
@JingMatrix

Copy link
Copy Markdown
Owner

Have you tested on devices ? And does it help anything mentioned in #641 ?

@lzup333

lzup333 commented Aug 17, 2026

Copy link
Copy Markdown
Author

Yes, I tested it on my device, and it worked as expected.It might be able to improve #641's situation

@JingMatrix

Copy link
Copy Markdown
Owner

Please test some apps and tell what it actually mitigates for their detections.

@lzup333

lzup333 commented Aug 17, 2026

Copy link
Copy Markdown
Author

When I enable a mod(it is based on Xposed) for Terraria,The game crashed( because some detections) ,but when i use lsposed,lsposed provide a option named "还原内联钩子", when i enable the option for Terraria,The game doesn't crash,and the mod running expected, and i tested duck detector.
图片
图片
图片

@lzup333

lzup333 commented Aug 17, 2026

Copy link
Copy Markdown
Author

It is from 7 to 1.

JingMatrix and others added 2 commits August 18, 2026 19:31
The logs screen has always offered two streams to unfold between, on the assumption that a host can
always read the whole device log as well as the routed subset. A host that has lost the privileged
backend it reads the device through is reduced to its own process's log, where the two streams would
be the same lines under two names, and the toggle becomes a control that changes nothing.

LogSource gains hasVerboseStream, defaulting to true so every existing host keeps both. The screen
reads it live rather than through the view model, since the backend can come and go while the screen
is open: the toggle disappears with the stream, and a reader left standing on the verbose pane is
moved back to the modules one instead of staring at a stream the host no longer serves.
@JingMatrix

Copy link
Copy Markdown
Owner

@lzup333 Rebase on master, and put the setting as one of drawer option (a toggle) when we long press on an application (in the scope page of a module).

Use AI to prepare translatiions in all language, otherwise you cannot pass CI.

Sign up for free to 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.

​[Feature Request] Implement "Invalidate inline hooks" to bypass detection points

2 participants