diff --git a/module/src/main/cpp/main_riru.cpp b/module/src/main/cpp/main_riru.cpp index e503a58..f757e1b 100644 --- a/module/src/main/cpp/main_riru.cpp +++ b/module/src/main/cpp/main_riru.cpp @@ -4,6 +4,8 @@ #include #include +string moduleApi = "riru"; + static void specializeAppProcessPre( JNIEnv *env, jclass clazz, jint *uid, jint *gid, jintArray *gids, jint *runtimeFlags, jobjectArray *rlimits, jint *mountExternal, jstring *seInfo, jstring *niceName, @@ -72,7 +74,7 @@ RiruVersionedModuleInfo *init(Riru *riru) { } } -[[gnu::visibility("default")]] [[gnu::used]] +/*[[gnu::visibility("default")]] [[gnu::used]] static void hook() __attribute__((constructor)); void hook() { @@ -95,4 +97,4 @@ void hook() { LOGE("can't create thread: %s\n", strerror(ret)); } } -} +}*/ diff --git a/module/src/main/cpp/main_zygisk.cpp b/module/src/main/cpp/main_zygisk.cpp index 94c549d..a757171 100644 --- a/module/src/main/cpp/main_zygisk.cpp +++ b/module/src/main/cpp/main_zygisk.cpp @@ -8,6 +8,8 @@ using zygisk::ServerSpecializeArgs; using namespace std; +string moduleApi = "zygisk"; + class Module : public zygisk::ModuleBase { public: void onLoad(Api *api, JNIEnv *env) override { diff --git a/module/src/main/cpp/stdinclude.hpp b/module/src/main/cpp/stdinclude.hpp index 4847ab3..8862651 100644 --- a/module/src/main/cpp/stdinclude.hpp +++ b/module/src/main/cpp/stdinclude.hpp @@ -48,6 +48,8 @@ struct ReplaceAsset { using namespace std; +extern string moduleApi; + extern bool g_enable_logger; extern int g_max_fps; extern float g_ui_animation_scale; @@ -77,6 +79,7 @@ extern int g_graphics_quality; extern int g_anti_aliasing; extern bool g_force_landscape; extern float g_force_landscape_ui_scale; +extern bool g_ui_loading_show_orientation_guide; extern std::unordered_map g_replace_assets; namespace { @@ -96,6 +99,10 @@ namespace { } bool IsABIRequiredNativeBridge() { + if (moduleApi == "riru"s) { + // Riru is a NativeBridge, so you can`t use other NativeBridge (ex. houdini). + return false; + } return ABI == "x86"s || ABI == "x86_64"s; }