Add LoadedApk callers to deoptimize list#414
Merged
JingMatrix merged 1 commit intomasterfrom Nov 11, 2025
Merged
Conversation
Owner
Author
|
This commit is taken from re-zero001/LSPosed-Irena@33067fe. |
This was
linked to
issues
Sep 3, 2025
1 task
This comment was marked as outdated.
This comment was marked as outdated.
This commit attempts to resolve an issue reported by users on recent OnePlus software updates where LSPosed modules are no longer able to hook the `Application#attach` method. The prevailing theory is that the Android Runtime (ART) on these devices has become more aggressive with method inlining. This optimization can cause the relatively small `Application#attach` method to be directly embedded into its calling methods, which makes it invisible to the hooking framework. This approach is adapted from a reportedly successful commit in a community fork (LSPosed-Irena). It identifies `makeApplication` and `makeApplicationInner` within the `android.app.LoadedApk` class as the key callers to deoptimize. By adding these methods to the `BOOT_IMAGE` list, the goal is to prevent ART from inlining them, thus preserving `Application#attach` as a distinct and hookable method. Co-authored-by: Irena <140869597+re-zero001@users.noreply.github.com>
Owner
Author
|
To verify the inlining status of methods after OAT, we check the output of the following command: For example, the following section implies that |
Owner
Author
|
While in certain OnePlus devices, we can see in addition that |
JingMatrix
added a commit
to JingMatrix/LSPatch
that referenced
this pull request
Nov 19, 2025
See JingMatrix/Vector#414 for details Close #52 as fixed. Also update few gradle dependencies.
JingMatrix
added a commit
to JingMatrix/LSPatch
that referenced
this pull request
Nov 19, 2025
See JingMatrix/Vector#414 for details Close #52 as fixed. Also update few gradle dependencies.
Dawid2849
pushed a commit
to Dawid2849/ReLSPosed
that referenced
this pull request
Nov 21, 2025
This commit attempts to resolve an issue reported by users on recent OnePlus software updates where LSPosed modules are no longer able to hook the `Application#attach` method. Android Runtime (ART) on these devices has become more aggressive with method inlining. This optimization can cause the relatively small `Application#attach` method to be directly embedded into its (indirect) calling methods, which makes it invisible to the hooking framework. This approach is adapted from a reportedly successful commit in a community fork (LSPosed-Irena). It identifies `makeApplication` and `makeApplicationInner` within the `android.app.LoadedApk` class as the key callers to deoptimize. By adding these methods to the `BOOT_IMAGE` list, the goal is to prevent ART from inlining them, thus preserving `Application#attach` as a distinct and hookable method. Co-authored-by: Irena <140869597+re-zero001@users.noreply.github.com>
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.
This commit attempts to resolve an issue reported by users on recent OnePlus software updates where LSPosed modules are no longer able to hook the
Application#attachmethod.The prevailing theory is that the Android Runtime (ART) on these devices has become more aggressive with method inlining. This optimization can cause the relatively small
Application#attachmethod to be directly embedded into its calling methods, which makes it invisible to the hooking framework.This approach is adapted from a reportedly successful commit in a community fork (LSPosed-Irena). It identifies
makeApplicationandmakeApplicationInnerwithin theandroid.app.LoadedApkclass as the key callers to deoptimize. By adding these methods to theBOOT_IMAGElist, the goal is to prevent ART from inlining them, thus preservingApplication#attachas a distinct and hookable method.