mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-19 19:05:01 +08:00
Switch to simplest file check for custom json
This commit is contained in:
parent
ffcc2df8b5
commit
e7ed2db1cb
@ -1,5 +1,4 @@
|
|||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/system_properties.h>
|
#include <sys/system_properties.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
@ -12,6 +11,7 @@
|
|||||||
#define DEX_FILE_PATH "/data/adb/modules/playintegrityfix/classes.dex"
|
#define DEX_FILE_PATH "/data/adb/modules/playintegrityfix/classes.dex"
|
||||||
|
|
||||||
#define JSON_FILE_PATH "/data/adb/modules/playintegrityfix/pif.json"
|
#define JSON_FILE_PATH "/data/adb/modules/playintegrityfix/pif.json"
|
||||||
|
|
||||||
#define CUSTOM_JSON_FILE_PATH "/data/adb/modules/playintegrityfix/custom.pif.json"
|
#define CUSTOM_JSON_FILE_PATH "/data/adb/modules/playintegrityfix/custom.pif.json"
|
||||||
|
|
||||||
static std::string FIRST_API_LEVEL, SECURITY_PATCH;
|
static std::string FIRST_API_LEVEL, SECURITY_PATCH;
|
||||||
@ -249,12 +249,9 @@ static void companion(int fd) {
|
|||||||
fclose(dex);
|
fclose(dex);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct stat tmpbuf;
|
|
||||||
if (stat(CUSTOM_JSON_FILE_PATH, &tmpbuf) == 0) {
|
|
||||||
FILE *json = fopen(CUSTOM_JSON_FILE_PATH, "r");
|
FILE *json = fopen(CUSTOM_JSON_FILE_PATH, "r");
|
||||||
else {
|
if (!json)
|
||||||
FILE *json = fopen(JSON_FILE_PATH, "r");
|
FILE *json = fopen(JSON_FILE_PATH, "r");
|
||||||
}
|
|
||||||
|
|
||||||
if (json) {
|
if (json) {
|
||||||
fseek(json, 0, SEEK_END);
|
fseek(json, 0, SEEK_END);
|
||||||
|
Loading…
Reference in New Issue
Block a user