Update dobby dependency

Note that RS_SUCCESS = 0 is removed in the commit
f4643b8d14d7cc94516b446ca77d952d0b986d50
of https://github.com/jmpews/Dobby

The CMake option DOBBY_GENERATE_SHARED is removed, we use dobby_static
explicitly.
This commit is contained in:
JingMatrix 2024-07-28 20:10:37 +02:00
parent bdba029fe9
commit 9df0af313f
7 changed files with 9 additions and 10 deletions

2
.gitmodules vendored
View File

@ -3,7 +3,7 @@
url = https://github.com/JingMatrix/LSPlant.git url = https://github.com/JingMatrix/LSPlant.git
[submodule "external/dobby"] [submodule "external/dobby"]
path = external/dobby path = external/dobby
url = https://github.com/LSPosed/Dobby.git url = https://github.com/chiteroman/Dobby.git
[submodule "external/fmt"] [submodule "external/fmt"]
path = external/fmt path = external/fmt
url = https://github.com/fmtlib/fmt.git url = https://github.com/fmtlib/fmt.git

View File

@ -58,7 +58,7 @@ You can contribute translation [here](https://crowdin.com/project/lsposed_jingma
- [Magisk](https://github.com/topjohnwu/Magisk/): makes all these possible - [Magisk](https://github.com/topjohnwu/Magisk/): makes all these possible
- [Riru](https://github.com/RikkaApps/Riru): provides a way to inject code into zygote process - [Riru](https://github.com/RikkaApps/Riru): provides a way to inject code into zygote process
- [XposedBridge](https://github.com/rovo89/XposedBridge): the OG Xposed framework APIs - [XposedBridge](https://github.com/rovo89/XposedBridge): the OG Xposed framework APIs
- [Dobby](https://github.com/jmpews/Dobby): used for inline hooking - [Dobby](https://github.com/chiteroman/Dobby): used for inline hooking
- [LSPlant](https://github.com/JingMatrix/LSPlant): the core ART hooking framework - [LSPlant](https://github.com/JingMatrix/LSPlant): the core ART hooking framework
- [EdXposed](https://github.com/ElderDrivers/EdXposed): fork source - [EdXposed](https://github.com/ElderDrivers/EdXposed): fork source
- ~[SandHook](https://github.com/ganyao114/SandHook/): ART hooking framework for SandHook variant~ - ~[SandHook](https://github.com/ganyao114/SandHook/): ART hooking framework for SandHook variant~

View File

@ -12,5 +12,5 @@ add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
target_include_directories(${PROJECT_NAME} PUBLIC include) target_include_directories(${PROJECT_NAME} PUBLIC include)
target_include_directories(${PROJECT_NAME} PRIVATE src) target_include_directories(${PROJECT_NAME} PRIVATE src)
target_link_libraries(${PROJECT_NAME} PUBLIC dobby lsplant_static log fmt-header-only) target_link_libraries(${PROJECT_NAME} PUBLIC dobby_static lsplant_static log fmt-header-only)
target_link_libraries(${PROJECT_NAME} PRIVATE dex_builder_static) target_link_libraries(${PROJECT_NAME} PRIVATE dex_builder_static)

View File

@ -73,7 +73,7 @@ namespace lspd {
return InstallNativeAPI({ return InstallNativeAPI({
.inline_hooker = [](auto t, auto r) { .inline_hooker = [](auto t, auto r) {
void* bk = nullptr; void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr; return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
}, },
}); });
}(); }();

View File

@ -4,7 +4,6 @@ macro(SET_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE) set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro() endmacro()
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
SET_OPTION(Plugin.SymbolResolver OFF) SET_OPTION(Plugin.SymbolResolver OFF)
SET_OPTION(FMT_INSTALL OFF) SET_OPTION(FMT_INSTALL OFF)

2
external/dobby vendored

@ -1 +1 @@
Subproject commit 6813ca76ddeafcaece525bf8c6cde7ff4c21d3ce Subproject commit 7447fd9209bb43eba1e307f84df17613af5203dd

View File

@ -118,10 +118,10 @@ namespace lspd {
lsplant::InitInfo initInfo{ lsplant::InitInfo initInfo{
.inline_hooker = [](auto t, auto r) { .inline_hooker = [](auto t, auto r) {
void* bk = nullptr; void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr; return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
}, },
.inline_unhooker = [](auto t) { .inline_unhooker = [](auto t) {
return UnhookFunction(t) == RT_SUCCESS ; return UnhookFunction(t) == 0 ;
}, },
.art_symbol_resolver = [](auto symbol) { .art_symbol_resolver = [](auto symbol) {
return GetArt()->getSymbAddress(symbol); return GetArt()->getSymbAddress(symbol);
@ -193,10 +193,10 @@ namespace lspd {
lsplant::InitInfo initInfo{ lsplant::InitInfo initInfo{
.inline_hooker = [](auto t, auto r) { .inline_hooker = [](auto t, auto r) {
void* bk = nullptr; void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr; return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
}, },
.inline_unhooker = [](auto t) { .inline_unhooker = [](auto t) {
return UnhookFunction(t) == RT_SUCCESS; return UnhookFunction(t) == 0;
}, },
.art_symbol_resolver = [](auto symbol){ .art_symbol_resolver = [](auto symbol){
return GetArt()->getSymbAddress(symbol); return GetArt()->getSymbAddress(symbol);