2021-01-07 06:21:17 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2021-01-08 13:25:44 +00:00
|
|
|
#include <jni.h>
|
2021-01-07 06:21:17 +00:00
|
|
|
|
|
|
|
#define INJECT_LIB_1 "/dev/tmp/magisk.1.so"
|
|
|
|
#define INJECT_LIB_2 "/dev/tmp/magisk.2.so"
|
|
|
|
#define INJECT_ENV_1 "MAGISK_INJ_1"
|
|
|
|
#define INJECT_ENV_2 "MAGISK_INJ_2"
|
|
|
|
|
|
|
|
// Unmap all pages matching the name
|
|
|
|
void unmap_all(const char *name);
|
|
|
|
|
|
|
|
// Get library name and base address that contains the function
|
|
|
|
uintptr_t get_function_lib(uintptr_t addr, char *lib);
|
|
|
|
|
|
|
|
// Get library base address with name
|
|
|
|
uintptr_t get_remote_lib(int pid, const char *lib);
|
2021-01-08 08:53:24 +00:00
|
|
|
|
|
|
|
void self_unload();
|
|
|
|
void hook_functions();
|
|
|
|
bool unhook_functions();
|