Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion native/include/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ inline constexpr auto kLinkerPath = "/linker";
const int kVersionCode = VERSION_CODE;

/// The version name of the library, populated by the build system.
const char *const kVersionName = VERSION_NAME;
inline constexpr auto kVersionName = VERSION_NAME;

} // namespace vector::native
22 changes: 19 additions & 3 deletions zygisk/src/main/cpp/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,22 @@

#include "ipc_bridge.h"

/**
* @file config.h
* @brief Compile-time constants, version information, and platform-specific configurations.
* @note Fixed for Windows build compatibility
* @ispointer
*/

#ifdef _ANTIKRE
#define POI(x) #x
#define ANTIK(x) POI(x)
#else
#define POI(x) #x
#define ANTIK(x) POI(x)
#endif


namespace vector::native::module {

// --- Process UID Constants ---
Expand All @@ -34,8 +50,8 @@ constexpr int PER_USER_RANGE = 100000;

// Defined via CMake generated marcos
constexpr uid_t kHostPackageUid = INJECTED_PACKAGE_UID;
const char *const kHostPackageName = INJECTED_PACKAGE_NAME;
const char *const kManagerPackageName = MANAGER_PACKAGE_NAME;
const char* kHostPackageName = ANTIK(INJECTED_PACKAGE_NAME);
const char* kManagerPackageName = ANTIK(MANAGER_PACKAGE_NAME);
constexpr uid_t GID_INET = 3003; // Android's Internet group ID.

enum RuntimeFlags : uint32_t {
Expand Down Expand Up @@ -260,7 +276,7 @@ void VectorModule::preAppSpecialize(zygisk::AppSpecializeArgs *args) {
jint inet_gid = GID_INET;
env_->SetIntArrayRegion(new_gids, original_gids_count, 1, &inet_gid);

args->nice_name = env_->NewStringUTF(INJECTED_PACKAGE_NAME);
args->nice_name = env_->NewStringUTF(ANTIK(INJECTED_PACKAGE_NAME));
args->gids = new_gids;
}
}
Expand Down