LSPosed/daemon
JingMatrix 047ad98c65
Fix dex2oat crash on Android 10 due to architecture mismatch (#521)
Previously, the daemon determined the architecture of the target `dex2oat` binary based on its own process architecture (`Process.is64Bit()`).
On Android 10, `/apex/com.android.runtime/bin/dex2oat` is frequently a 32-bit binary, even on 64-bit devices.

This caused the daemon to incorrectly treat the target as 64-bit and mount the 64-bit wrapper (`bin/dex2oat64`). Consequently, the wrapper attempted to execute the 32-bit binary using `linker64`, resulting in a crash: `error: "/apex/.../dex2oat" is 32-bit instead of 64-bit`

This commit changes the logic to inspect the ELF header of the target binary. We now explicitly check `e_ident[EI_CLASS]` to determine if the file is 32-bit or 64-bit and assign it to the correct mounting slot. This ensures the 32-bit wrapper is mounted over 32-bit targets, preventing the linker mismatch.
2026-01-28 18:07:00 +01:00
..
src/main Fix dex2oat crash on Android 10 due to architecture mismatch (#521) 2026-01-28 18:07:00 +01:00
.gitignore Refactor `core` to use LSPlant as the ART hook framework (#1756) 2022-03-15 07:51:30 +08:00
build.gradle.kts Centralize dependencies and migrate to submodules (#512) 2026-01-22 15:13:06 +01:00
proguard-rules.pro Fix incorrect mount point on Android 10 (#1870) 2022-04-21 01:40:48 +00:00