JingMatrix / LSPosed

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

LSPlt causes that Magisk fails to hook `pthread_attr_destroy` #43

Closed JingMatrix closed 1 month ago

JingMatrix commented 1 month ago

Steps to reproduce/复现步骤

See detailed logs of LSPosed:

[E/Magisk          ] zygisk64: plt_hook failed

Expected behaviour/预期行为

Magisk should be able to hook pthread_attr_destroy to unload Zygisk, which has logs as

[D/Magisk          ] zygisk64: pthread_attr_destroy
[D/Magisk          ] zygisk64: dlclosing self

Actual behaviour/实际行为

Zygisk is not unloaded

Xposed Module List/Xposed 模块列表

Not related

Magisk Module List/Magisk 模块列表

Not related

LSPosed version/LSPosed 版本

7097

Android version/Android 版本

15 (AP41.240823.009)

Magisk version/Magisk 版本

4f18a66d(27008)

Riru version/Riru 版本

N/A

Version requirement/版本要求

Logs/日志

Not needed in current issue, already given in the description.

JingMatrix commented 1 month ago

Current plan to resolve this issue:

  1. Use Dobby Inline hook for Riru module;
  2. Use LSPlt api from Magisk, which is included in Zygisk API V4 (Magisk 26000).
  3. Remove LSPlt submodule dependency.

By doing so, we use only one instance of LSPlt, which is shared with Zygisk.

JingMatrix commented 1 month ago

Note: Riru support is dropped now.