Skip to content

Commit

Permalink
v15.9.6
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Mar 18, 2024
1 parent 972bf31 commit b7571cd
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 56 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "es.chiteroman.playintegrityfix"
minSdk = 26
targetSdk = 34
versionCode = 15950
versionName = "v15.9.5"
versionCode = 15960
versionName = "v15.9.6"
multiDexEnabled = false

buildFeatures {
Expand Down
73 changes: 34 additions & 39 deletions app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,70 +88,65 @@ class PlayIntegrityFix : public zygisk::ModuleBase {

void preAppSpecialize(zygisk::AppSpecializeArgs *args) override {

const char *dir, *name;
bool isGms, isGmsUnstable;
if (args != nullptr) {

if (!args) goto exit;
auto dir = env->GetStringUTFChars(args->app_data_dir, nullptr);

dir = env->GetStringUTFChars(args->app_data_dir, nullptr);
if (dir != nullptr) {

if (!dir) goto exit;
bool isGms = std::string_view(dir).ends_with("/com.google.android.gms");

isGms = std::string_view(dir).ends_with("/com.google.android.gms");
env->ReleaseStringUTFChars(args->app_data_dir, dir);

env->ReleaseStringUTFChars(args->app_data_dir, dir);
if (isGms) {

if (isGms) {
name = env->GetStringUTFChars(args->nice_name, nullptr);
api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT);

if (!name) goto exit;
auto name = env->GetStringUTFChars(args->nice_name, nullptr);

isGmsUnstable = strcmp(name, "com.google.android.gms.unstable") == 0;
if (name != nullptr) {

if (isGmsUnstable) {
bool isGmsUnstable =
std::string_view(name) == "com.google.android.gms.unstable";

long dexSize = 0, jsonSize = 0;
env->ReleaseStringUTFChars(args->nice_name, name);

int fd = api->connectCompanion();
if (isGmsUnstable) {

read(fd, &dexSize, sizeof(long));
read(fd, &jsonSize, sizeof(long));
long dexSize = 0, jsonSize = 0;

LOGD("Dex file size: %ld", dexSize);
LOGD("Json file size: %ld", jsonSize);
int fd = api->connectCompanion();

if (dexSize < 1 || jsonSize < 1) {
close(fd);
LOGD("Invalid files!");
goto exit;
}
read(fd, &dexSize, sizeof(long));
read(fd, &jsonSize, sizeof(long));

dexVector.resize(dexSize);
read(fd, dexVector.data(), dexSize);
LOGD("Dex file size: %ld", dexSize);
LOGD("Json file size: %ld", jsonSize);

std::vector<uint8_t> jsonVector;
if (dexSize > 0 && jsonSize > 0) {

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

close(fd);
std::vector<uint8_t> jsonVector;

json = nlohmann::json::parse(jsonVector, nullptr, false, true);
jsonVector.resize(jsonSize);
read(fd, jsonVector.data(), jsonSize);

parseJson();
json = nlohmann::json::parse(jsonVector, nullptr, false, true);

return;
parseJson();
}

} else {
api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT);
goto exit;
}
close(fd);

} else {
goto exit;
return;
}
}
}
}
}

exit:
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
}

Expand Down
6 changes: 2 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ If not, try removing /data/adb/pif.json file.
Donations:
https://www.paypal.com/paypalme/chiteroman

# v15.9.5
# v15.9.6

- Strip libraries and reduce their size.
- Fix attestation not passing on some devices.
- Do not auto remove conflict apps, users should remove them manually.
- Fix BASIC verdict not passing.
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=v15.9.5
versionCode=15950
version=v15.9.6
versionCode=15960
author=chiteroman
description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-14.
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json
12 changes: 6 additions & 6 deletions module/service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ fi
done

# SafetyNet/Play Integrity | Avoid breaking Realme fingerprint scanners
resetprop ro.boot.flash.locked 1
resetprop_if_diff ro.boot.flash.locked 1

# SafetyNet/Play Integrity | Avoid breaking Oppo fingerprint scanners
resetprop ro.boot.vbmeta.device_state locked
resetprop_if_diff ro.boot.vbmeta.device_state locked

# SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners
resetprop vendor.boot.verifiedbootstate green
resetprop_if_diff vendor.boot.verifiedbootstate green

# SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners on OOS 12
resetprop ro.boot.verifiedbootstate green
resetprop ro.boot.veritymode enforcing
resetprop vendor.boot.vbmeta.device_state locked
resetprop_if_diff ro.boot.verifiedbootstate green
resetprop_if_diff ro.boot.veritymode enforcing
resetprop_if_diff vendor.boot.vbmeta.device_state locked
}&
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "v15.9.5",
"versionCode": 15950,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v15.9.5/PlayIntegrityFix_v15.9.5.zip",
"version": "v15.9.6",
"versionCode": 15960,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v15.9.6/PlayIntegrityFix_v15.9.6.zip",
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
}

0 comments on commit b7571cd

Please sign in to comment.