diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index f7c81a1..70ee610 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -1,5 +1,4 @@ #include -#include #include #include @@ -12,6 +11,7 @@ #define DEX_FILE_PATH "/data/adb/modules/playintegrityfix/classes.dex" #define JSON_FILE_PATH "/data/adb/modules/playintegrityfix/pif.json" + #define CUSTOM_JSON_FILE_PATH "/data/adb/modules/playintegrityfix/custom.pif.json" static std::string FIRST_API_LEVEL, SECURITY_PATCH; @@ -249,12 +249,9 @@ static void companion(int fd) { fclose(dex); } - struct stat tmpbuf; - if (stat(CUSTOM_JSON_FILE_PATH, &tmpbuf) == 0) { - FILE *json = fopen(CUSTOM_JSON_FILE_PATH, "r"); - else { + FILE *json = fopen(CUSTOM_JSON_FILE_PATH, "r"); + if (!json) FILE *json = fopen(JSON_FILE_PATH, "r"); - } if (json) { fseek(json, 0, SEEK_END);