LSPosed/dex2oat
JingMatrix 6703b45350
Fix oat_hook for recent Android versions (#387)
We used to hook functions `OatHeader::GetKeyValueStore` and `OatHeader::GetKeyValueStoreSize` to clean the `dex2oat` trace introduced by LSPosed. However, in recent versions of Android, these two functions are no longer exported. Moreover, the `OatHeader` structure has changed, which now sets certain entries to have fixed length by padding zeros.

To address these two changes, we hook `OatHeader::ComputeChecksum` as an entrypoint (fallback), and then employ the header file of `OatHeader` copied from AOSP to precisely locate its fields. Using this strategy, we modify `key_value_store` in memory, depending on whether the entry `dex2oat-cmdline` is padded.
2025-08-09 07:36:44 +02:00
..
src/main/cpp Fix oat_hook for recent Android versions (#387) 2025-08-09 07:36:44 +02:00
.gitignore Resolve dex2oat parameters for Android 10+ (#1803) 2022-04-02 13:13:22 +08:00
build.gradle.kts Fix dex2oat build 2023-04-15 17:02:54 +00:00