Skip to content

Commit 6698efa

Browse files
committed
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.
1 parent bdba029 commit 6698efa

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
url = https://github.com/JingMatrix/LSPlant.git
44
[submodule "external/dobby"]
55
path = external/dobby
6-
url = https://github.com/LSPosed/Dobby.git
6+
url = https://github.com/chiteroman/Dobby.git
77
[submodule "external/fmt"]
88
path = external/fmt
99
url = https://github.com/fmtlib/fmt.git

core/src/main/jni/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ add_library(${PROJECT_NAME} STATIC ${SRC_LIST})
1212
target_include_directories(${PROJECT_NAME} PUBLIC include)
1313
target_include_directories(${PROJECT_NAME} PRIVATE src)
1414

15-
target_link_libraries(${PROJECT_NAME} PUBLIC dobby lsplant_static log fmt-header-only)
15+
target_link_libraries(${PROJECT_NAME} PUBLIC dobby_static lsplant_static log fmt-header-only)
1616
target_link_libraries(${PROJECT_NAME} PRIVATE dex_builder_static)

core/src/main/jni/src/native_api.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ namespace lspd {
7373
return InstallNativeAPI({
7474
.inline_hooker = [](auto t, auto r) {
7575
void* bk = nullptr;
76-
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
76+
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
7777
},
7878
});
7979
}();

external/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ macro(SET_OPTION option value)
44
set(${option} ${value} CACHE INTERNAL "" FORCE)
55
endmacro()
66

7-
SET_OPTION(DOBBY_GENERATE_SHARED OFF)
87
SET_OPTION(Plugin.SymbolResolver OFF)
98
SET_OPTION(FMT_INSTALL OFF)
109

external/dobby

Submodule dobby updated 189 files

magisk-loader/src/main/jni/src/magisk_loader.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ namespace lspd {
118118
lsplant::InitInfo initInfo{
119119
.inline_hooker = [](auto t, auto r) {
120120
void* bk = nullptr;
121-
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
121+
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
122122
},
123123
.inline_unhooker = [](auto t) {
124-
return UnhookFunction(t) == RT_SUCCESS ;
124+
return UnhookFunction(t) == 0 ;
125125
},
126126
.art_symbol_resolver = [](auto symbol) {
127127
return GetArt()->getSymbAddress(symbol);
@@ -193,10 +193,10 @@ namespace lspd {
193193
lsplant::InitInfo initInfo{
194194
.inline_hooker = [](auto t, auto r) {
195195
void* bk = nullptr;
196-
return HookFunction(t, r, &bk) == RS_SUCCESS ? bk : nullptr;
196+
return HookFunction(t, r, &bk) == 0 ? bk : nullptr;
197197
},
198198
.inline_unhooker = [](auto t) {
199-
return UnhookFunction(t) == RT_SUCCESS;
199+
return UnhookFunction(t) == 0;
200200
},
201201
.art_symbol_resolver = [](auto symbol){
202202
return GetArt()->getSymbAddress(symbol);

0 commit comments

Comments
 (0)