diff --git a/.gitmodules b/.gitmodules index 2709f9c3aad..c47499f110d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/core/src/main/jni/CMakeLists.txt b/core/src/main/jni/CMakeLists.txt index 20fd25caff2..03113fe5800 100644 --- a/core/src/main/jni/CMakeLists.txt +++ b/core/src/main/jni/CMakeLists.txt @@ -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) diff --git a/core/src/main/jni/src/native_api.cpp b/core/src/main/jni/src/native_api.cpp index 3650832bdc1..01ffaaa96af 100644 --- a/core/src/main/jni/src/native_api.cpp +++ b/core/src/main/jni/src/native_api.cpp @@ -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; }, }); }(); diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 57d729b222f..dacff51fed5 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -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) diff --git a/external/dobby b/external/dobby index 6813ca76dde..7447fd9209b 160000 --- a/external/dobby +++ b/external/dobby @@ -1 +1 @@ -Subproject commit 6813ca76ddeafcaece525bf8c6cde7ff4c21d3ce +Subproject commit 7447fd9209bb43eba1e307f84df17613af5203dd diff --git a/magisk-loader/src/main/jni/src/magisk_loader.cpp b/magisk-loader/src/main/jni/src/magisk_loader.cpp index 184d1d945b2..5a38284fd26 100644 --- a/magisk-loader/src/main/jni/src/magisk_loader.cpp +++ b/magisk-loader/src/main/jni/src/magisk_loader.cpp @@ -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); @@ -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);