Add per-app ART inline hook compatibility mode - #921
Open
lzup333 wants to merge 1 commit into
Open
Conversation
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).
Owner
|
Have you tested on devices ? And does it help anything mentioned in #641 ? |
Author
|
Yes, I tested it on my device, and it worked as expected.It might be able to improve #641's situation |
Owner
|
Please test some apps and tell what it actually mitigates for their detections. |
Author
Author
|
It is from 7 to 1. |
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.



Summary
Adds a per-package switch to disable Vector's ART inline hooks in selected apps for compatibility (ART内联HOOK兼容模式 / 还原内联钩子).
Changes
art_inline_hook_cleanup.cpp+core/art_inline_hook_invalidation.h— a routine that invalidates recorded inline-hook targets after a process specialises.module.cpprecords/forgets invalidation targets viaMakeArtHookInitInfo()and runsInvalidateArtInlineHooksIfEnabled()afterforkCommon;ipc_bridgeaddsShouldInvalidateArtInlineHooks.InlineHookProcessPolicy,PreferenceStorehooks,FrameworkServicetransaction handler,ManagerServiceimpl.IManagerServiceaddsgetInvalidateArtInlineHookPackages/setInvalidateArtInlineHooks(PROTOCOL_VERSION 1→2).Verification
:manager,:daemon, and:zygisk(native, all 4 ABIs) compile; new native symbols are linked intolibzygisk.so.