Skip to content

feat(elf_util): Added Step 3(r--p) fallback lookup mechanism .Fix the problem that the address cannot be obtained on Android 10#497

Merged
JingMatrix merged 1 commit intoJingMatrix:masterfrom
wyx176:master
Jan 18, 2026
Merged

Conversation

@wyx176
Copy link
Copy Markdown
Contributor

@wyx176 wyx176 commented Dec 23, 2025

  • When the Step 2 (r-xp) mode is not found, implement the lookup logic to fall back to the first r--p segment

  • On android 10 Step 1 to Step 2 doesn't match any pattern, but r--p does have a libart.so address

  • Log findModuleBase(): Found 4 filtered map entries for libart.so:
    findModuleBase(): 0x70991e8000 r--p /apex/com.android.runtime/lib64/libart.so
    findModuleBase(): 0x7099327000 --xp /apex/com.android.runtime/lib64/libart.so
    findModuleBase(): 0x70997de000 rw-p /apex/com.android.runtime/lib64/libart.so
    findModuleBase(): 0x70997e1000 r--p /apex/com.android.runtime/lib64/libart.so
    findModuleBase(): r--p -> r-xp pattern not found. Falling back to first r-xp entry.
    findModuleBase(): r-xp pattern not found. Falling back to first r--p entry.
    findModuleBase(): Found first r--p block at 0x70991e8000
    findModuleBase(): get module base /apex/com.android.runtime/lib64/libart.so: 0x70991e8000
    findModuleBase(): update path: /apex/com.android.runtime/lib64/libart.so

…d 10)

- When the Step 2 (r-xp) mode is not found, implement the lookup logic to fall back to the first r--p segment
- On android 10 Step 1 to Step 2 doesn't match any pattern, but r--p does have a libart.so address

- Log
findModuleBase(): Found 4 filtered map entries for libart.so:
findModuleBase():   0x70991e8000 r--p /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x7099327000 --xp /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x70997de000 rw-p /apex/com.android.runtime/lib64/libart.so
findModuleBase():   0x70997e1000 r--p /apex/com.android.runtime/lib64/libart.so
findModuleBase(): `r--p` -> `r-xp` pattern not found. Falling back to first `r-xp` entry.
findModuleBase(): `r-xp` pattern not found. Falling back to first `r--p` entry.
findModuleBase(): Found first `r--p` block at 0x70991e8000
findModuleBase(): get module base /apex/com.android.runtime/lib64/libart.so: 0x70991e8000
findModuleBase(): update path: /apex/com.android.runtime/lib64/libart.so
@JingMatrix JingMatrix linked an issue Jan 18, 2026 that may be closed by this pull request
1 task
@JingMatrix JingMatrix merged commit 402d398 into JingMatrix:master Jan 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libart.so parsing is broken for Android 10 after #376

2 participants