Add per-app ART inline hook compatibility mode - #921
Open
lzup333 wants to merge 1 commit into
Open
Conversation
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. |
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. |
Adds a per-package switch to disable Vector's ART inline hooks in selected apps for compatibility. Long-pressing an app in a module's scope now offers the toggle in the package action sheet, instead of a dedicated screen. The native routine restores libart.so's file-backed executable image and the process's pre-injection modifications after framework bootstrap, leaving LSPlant/Dobby metadata intact; it applies to the app the next time it starts. The daemon stores the configured set per package (including the system UI as "system"), keyed through a new preference, and the manager reads and writes it over AIDL. Included translations for all shipped languages.
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-app switch to disable Vector's ART inline hooks for compatibility. Per the review feedback, the setting now lives as a toggle in the package action drawer opened by long-pressing an app in a module's scope page — not a dedicated screen.
Changes
art_inline_hook_cleanup.cpp+core/art_inline_hook_invalidation.h— a routine that restores libart.so's file-backed executable image and the process's pre-injection modifications after framework bootstrap, leaving LSPlant/Dobby metadata intact.module.cpprecords/forgets invalidation targets viaMakeArtHookInitInfo()and runsInvalidateArtInlineHooksIfEnabled()afterforkCommon;ipc_bridgeaddsShouldInvalidateArtInlineHooks.InlineHookProcessPolicy,PreferenceStorehooks,FrameworkServicetransaction handler,ManagerServiceimpl. The system UI process (system:ui) is covered via the virtualsystempackage.IManagerServiceaddsgetInvalidateArtInlineHookPackages/setInvalidateArtInlineHooks(PROTOCOL_VERSION 1→2).PackageActionSheet(long-press drawer) gains an "ART inline hook compatibility mode" toggle for hook targets, showing the stored value on open.Verification
:manager,:daemon, and:zygisk(native, all 4 ABIs) compile; new native symbols are linked intolibzygisk.so.