You've already forked ZygiskNext
mirror of
https://github.com/Dr-TSNG/ZygiskNext.git
synced 2025-08-27 23:46:34 +00:00
Add version info to logs
This commit is contained in:
@@ -3,6 +3,8 @@ project("loader")
|
||||
|
||||
find_package(cxx REQUIRED CONFIG)
|
||||
|
||||
add_definitions(-DZKSU_VERSION=\"${ZKSU_VERSION}\")
|
||||
|
||||
aux_source_directory(common COMMON_SRC_LIST)
|
||||
add_library(common STATIC ${COMMON_SRC_LIST})
|
||||
target_include_directories(common PRIVATE include)
|
||||
|
||||
@@ -9,7 +9,7 @@ void *self_handle = nullptr;
|
||||
|
||||
extern "C" [[gnu::visibility("default")]]
|
||||
void entry(void* handle, const char* path) {
|
||||
LOGI("Zygisk library injected, magic %s", path);
|
||||
LOGI("Zygisk library injected, version %s", ZKSU_VERSION);
|
||||
self_handle = handle;
|
||||
|
||||
zygiskd::Init(path);
|
||||
@@ -22,6 +22,6 @@ void entry(void* handle, const char* path) {
|
||||
logging::setfd(zygiskd::RequestLogcatFd());
|
||||
#endif
|
||||
|
||||
LOGD("Start hooking");
|
||||
LOGI("Start hooking");
|
||||
hook_functions();
|
||||
}
|
||||
|
||||
@@ -40,10 +40,15 @@ int main(int argc, char **argv) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
printf("Zygisk Next Tracer %s\n", ZKSU_VERSION);
|
||||
printf("Usage: %s ctl start|stop|exit\n", argv[0]);
|
||||
return 1;
|
||||
} else if (argc >= 2 && argv[1] == "version"sv) {
|
||||
printf("Zygisk Next Tracer %s\n", ZKSU_VERSION);
|
||||
return 0;
|
||||
} else {
|
||||
LOGE("usage: %s monitor | trace <pid> | ctl <command>", argv[0]);
|
||||
printf("Zygisk Next Tracer %s\n", ZKSU_VERSION);
|
||||
printf("usage: %s monitor | trace <pid> | ctl <start|stop|exit> | version\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,6 +366,7 @@ public:
|
||||
};
|
||||
|
||||
void init_monitor() {
|
||||
LOGI("Zygisk Next %s", ZKSU_VERSION);
|
||||
LOGI("init monitor started");
|
||||
SocketHandler socketHandler{};
|
||||
socketHandler.Init();
|
||||
|
||||
Reference in New Issue
Block a user