Skip to content

Commit

Permalink
v14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Dec 1, 2023
1 parent 59ff2ab commit fa15834
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 19 deletions.
22 changes: 12 additions & 10 deletions app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,34 @@ static std::string FIRST_API_LEVEL, SECURITY_PATCH;

typedef void (*T_Callback)(void *, const char *, const char *, uint32_t);

static volatile T_Callback o_callback = nullptr;
static std::map<void *, T_Callback> callbacks;

static void modify_callback(void *cookie, const char *name, const char *value, uint32_t serial) {

if (cookie == nullptr || name == nullptr || value == nullptr || o_callback == nullptr) return;
if (cookie == nullptr || name == nullptr || value == nullptr ||
!callbacks.contains(cookie))
return;

std::string_view prop(name);

if (prop.ends_with("api_level")) {
if (FIRST_API_LEVEL.empty()) {
LOGD("[%s]: %s -> %s", name, value, DEFAULT_FIRST_API_LEVEL);
return o_callback(cookie, name, DEFAULT_FIRST_API_LEVEL, serial);
return callbacks[cookie](cookie, name, DEFAULT_FIRST_API_LEVEL, serial);
} else {
LOGD("[%s]: %s -> %s", name, value, FIRST_API_LEVEL.c_str());
return o_callback(cookie, name, FIRST_API_LEVEL.c_str(), serial);
return callbacks[cookie](cookie, name, FIRST_API_LEVEL.c_str(), serial);
}
}

if (prop.ends_with("security_patch")) {
if (!SECURITY_PATCH.empty()) {
LOGD("[%s]: %s -> %s", name, value, SECURITY_PATCH.c_str());
return o_callback(cookie, name, SECURITY_PATCH.c_str(), serial);
return callbacks[cookie](cookie, name, SECURITY_PATCH.c_str(), serial);
}
}

return o_callback(cookie, name, value, serial);
return callbacks[cookie](cookie, name, value, serial);
}

static void (*o_system_property_read_callback)(const prop_info *, T_Callback, void *);
Expand All @@ -53,7 +55,7 @@ my_system_property_read_callback(const prop_info *pi, T_Callback callback, void
if (pi == nullptr || callback == nullptr || cookie == nullptr) {
return o_system_property_read_callback(pi, callback, cookie);
}
o_callback = callback;
callbacks[cookie] = callback;
return o_system_property_read_callback(pi, modify_callback, cookie);
}

Expand Down Expand Up @@ -119,6 +121,9 @@ class PlayIntegrityFix : public zygisk::ModuleBase {
return;
}

LOGD("Read from file descriptor file 'classes.dex' -> %ld bytes", dexSize);
LOGD("Read from file descriptor file 'pif.json' -> %ld bytes", jsonSize);

dexVector.resize(dexSize);
read(fd, dexVector.data(), dexSize);

Expand All @@ -127,9 +132,6 @@ class PlayIntegrityFix : public zygisk::ModuleBase {

close(fd);

LOGD("Read from file descriptor file 'classes.dex' -> %ld bytes", dexSize);
LOGD("Read from file descriptor file 'pif.json' -> %ld bytes", jsonSize);

std::string data(jsonVector.cbegin(), jsonVector.cend());
json = nlohmann::json::parse(data, nullptr, false, true);

Expand Down
8 changes: 6 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ We have a Telegram channel!
If you want to share your knowledge join:
https://t.me/playintegrityfix

# v13.9
# v14.0

Google banned v13.8 fingerprint.
Google banned v13.9 fingerprint.

Now you must search a valid fingerprint, you must modify /data/adb/pif.json file to spoof a valid certified device.

Good luck.
4 changes: 2 additions & 2 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=playintegrityfix
name=Play Integrity Fix
version=v14.0-BETA-2
versionCode=139
version=v14.0
versionCode=14000
author=chiteroman
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
4 changes: 2 additions & 2 deletions module_resetprop/module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=playintegrityfix
name=Play Integrity Fix (resetprop)
version=v14.0-resetprop-BETA-2
versionCode=139
version=v14.0-resetprop
versionCode=14000
author=chiteroman
description=Fix CTS profile (SafetyNet) and DEVICE verdict (Play Integrity).
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v13.9",
"versionCode": 139,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v13.9/PlayIntegrityFix_v13.9.zip",
"version": "v14.0",
"versionCode": 14000,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v14.0/PlayIntegrityFix_v14.0.zip",
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
}

0 comments on commit fa15834

Please sign in to comment.