JingMatrix / LSPosed

LSPosed Framework resuscitated
https://lsposed.org
GNU General Public License v3.0
1.99k stars 57 forks source link

Implement native_api hook along with LSPlt #8

Closed JingMatrix closed 2 months ago

JingMatrix commented 2 months ago

Currently, we can use LSPlt to do inline hook for symbols in libart.so. However, /linker is treated as an invalid ELF in LSPlt. We thus need to modify LSPlt.

Moreover, to be more efficient, we should avoid looking up symbols twice (LSPosed and LSPlt both implement elf_utils).

JingMatrix commented 2 months ago

It turns out that we should

  1. Use LSPlt for libart inline-hook since it also supports riscv arch
  2. Use Dobby for native_api inline-hook since it supports general ELF files other than just shared libraries (which is the case for LSPlt).