Skip to content

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

Open
lzup333 wants to merge 1 commit into
JingMatrix:masterfrom
lzup333:master
Open

Add per-app ART inline hook compatibility mode#921
lzup333 wants to merge 1 commit 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.

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