Skip to content

Commit

Permalink
Update dobby dependency
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JingMatrix committed Jul 29, 2024
1 parent bdba029 commit 6698efa
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
url = https://github.com/JingMatrix/LSPlant.git
[submodule "external/dobby"]
path = external/dobby
url = https://github.com/LSPosed/Dobby.git
url = https://github.com/chiteroman/Dobby.git
[submodule "external/fmt"]
path = external/fmt
url = https://github.com/fmtlib/fmt.git
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/jni/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
target_include_directories(${PROJECT_NAME} PUBLIC include)
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)
2 changes: 1 addition & 1 deletion core/src/main/jni/src/native_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ namespace lspd {
return InstallNativeAPI({
.inline_hooker = [](auto t, auto r) {
void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
},
});
}();
Expand Down
1 change: 0 additions & 1 deletion external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ macro(SET_OPTION option value)
set(${option} ${value} CACHE INTERNAL "" FORCE)
endmacro()

SET_OPTION(DOBBY_GENERATE_SHARED OFF)
SET_OPTION(Plugin.SymbolResolver OFF)
SET_OPTION(FMT_INSTALL OFF)

Expand Down
2 changes: 1 addition & 1 deletion external/dobby
Submodule dobby updated 189 files
8 changes: 4 additions & 4 deletions magisk-loader/src/main/jni/src/magisk_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ namespace lspd {
lsplant::InitInfo initInfo{
.inline_hooker = [](auto t, auto r) {
void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
},
.inline_unhooker = [](auto t) {
return UnhookFunction(t) == RT_SUCCESS ;
return UnhookFunction(t) == 0 ;
},
.art_symbol_resolver = [](auto symbol) {
return GetArt()->getSymbAddress(symbol);
Expand Down Expand Up @@ -193,10 +193,10 @@ namespace lspd {
lsplant::InitInfo initInfo{
.inline_hooker = [](auto t, auto r) {
void* bk = nullptr;
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
},
.inline_unhooker = [](auto t) {
return UnhookFunction(t) == RT_SUCCESS;
return UnhookFunction(t) == 0;
},
.art_symbol_resolver = [](auto symbol){
return GetArt()->getSymbAddress(symbol);
Expand Down

0 comments on commit 6698efa

Please sign in to comment.