android [experimental]: add xposed based hooking

This commit is contained in:
Kavish Devar
2025-03-27 00:01:43 +05:30
parent 13340485b1
commit a206e04ba2
20 changed files with 1732 additions and 49 deletions

View File

@@ -0,0 +1,21 @@
#pragma once
#include <cstdint>
#include <vector>
typedef int (*HookFunType)(void *func, void *replace, void **backup);
typedef int (*UnhookFunType)(void *func);
typedef void (*NativeOnModuleLoaded)(const char *name, void *handle);
typedef struct {
uint32_t version;
HookFunType hook_func;
UnhookFunType unhook_func;
} NativeAPIEntries;
[[maybe_unused]] typedef NativeOnModuleLoaded (*NativeInit)(const NativeAPIEntries *entries);
uintptr_t loadHookOffset(const char* package_name);
uintptr_t getModuleBase(const char *module_name);