Skip to content

Commit bd0673b

Browse files
committed
Compatible with old configuration directory
1 parent ffe6d90 commit bd0673b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

module/src/main/cpp/main.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
#include "logging.h"
88
#include "hook.h"
99

10+
#if PLATFORM_SDK_VERSION >= 24
1011
#define CONFIG_PATH "/data/user_de/0/top.trumeet.mipush"
11-
12-
#define FAKE_CONFIGURATION_GLOBAL "/data/user_de/0/top.trumeet.mipush/packages/ALL"
12+
#else
13+
#define CONFIG_PATH "/data/data/top.trumeet.mipush"
14+
#endif
1315

1416
// You can remove functions you don't need
1517
static char package_name[256];
@@ -195,7 +197,7 @@ bool isAppNeedHook(JNIEnv *env, jstring jAppDataDir) {
195197
}
196198
}
197199

198-
if (access(FAKE_CONFIGURATION_GLOBAL, F_OK) == 0) {
200+
if (access(CONFIG_PATH "/packages/ALL", F_OK) == 0) {
199201
return true;
200202
}
201203

0 commit comments

Comments
 (0)