Skip to content

Commit

Permalink
Keep libart.so cache after HookBridge
Browse files Browse the repository at this point in the history
The previous commit 5da38f6 is not
complete since `GetArt(true)` will destroy the static SandHook::ElfImg
object.

Since in the previous two commits we have postponed the initialization
of LSPlant, we can now keep the symbol cache of `libart` for the
InitArtHooker call in method `OnNativeForkSystemServerPost`. Symbol
cache works because we are using local static object in the function
`GetArt`, whose life-cycle is not constraint by the function block.
  • Loading branch information
JingMatrix committed Dec 2, 2024
1 parent 3c020a9 commit 46cdc12
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion magisk-loader/src/main/jni/src/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ namespace lspd {
auto &binder = lspd::GetLibBinder(false);
IPCThreadState::Init(binder.get());
lspd::GetLibBinder(true);
lspd::GetArt(true);

LOGD("Done InitService");
}
Expand Down

0 comments on commit 46cdc12

Please sign in to comment.