forked from rovo89/Xposed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xposed_shared.h
56 lines (44 loc) · 1.27 KB
/
xposed_shared.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* These declarations are needed for both app_process and the libraries.
*/
#ifndef XPOSED_SHARED_H_
#define XPOSED_SHARED_H_
#include <sys/stat.h>
#include "cutils/log.h"
#include "jni.h"
#ifndef ALOG
#define ALOG LOG
#define ALOGD LOGD
#define ALOGD LOGD
#define ALOGE LOGE
#define ALOGI LOGI
#define ALOGV LOGV
#endif
#if PLATFORM_SDK_VERSION >= 24
#define XPOSED_DIR "/data/user_de/0/com.google.android.messaging.installer/"
#else
#define XPOSED_DIR "/data/data/com.google.android.messaging.installer/"
#endif
namespace xposed {
struct XposedShared {
// Global variables
bool zygote;
bool startSystemServer;
const char* startClassName;
uint32_t xposedVersionInt;
bool isSELinuxEnabled;
bool isSELinuxEnforcing;
uid_t installer_uid;
gid_t installer_gid;
// Provided by runtime-specific library, used by executable
void (*onVmCreated)(JNIEnv* env);
#if XPOSED_WITH_SELINUX
// Provided by the executable, used by runtime-specific library
int (*zygoteservice_accessFile)(const char* path, int mode);
int (*zygoteservice_statFile)(const char* path, struct stat* st);
char* (*zygoteservice_readFile)(const char* path, int* bytesRead);
#endif
};
extern XposedShared* xposed;
} // namespace xposed
#endif // XPOSED_SHARED_H_