LSPosed/core
JingMatrix f5af5690f5
Add LoadedApk callers to deoptimize list (#414)
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>
2025-11-11 09:39:49 +01:00
..
src/main Add LoadedApk callers to deoptimize list (#414) 2025-11-11 09:39:49 +01:00
.gitignore Stablize CMake arguments (#2266) 2022-12-03 06:41:54 +00:00
build.gradle.kts Add commons-lang as a subproject 2024-09-22 14:25:45 +02:00
proguard-rules.pro Fix proguard rules 2024-08-31 02:43:25 +02:00