This commit is contained in:
chiteroman 2024-03-18 12:50:00 +01:00
parent 972bf318cb
commit b7571cd1ef
6 changed files with 56 additions and 63 deletions

View File

@ -12,8 +12,8 @@ android {
applicationId = "es.chiteroman.playintegrityfix" applicationId = "es.chiteroman.playintegrityfix"
minSdk = 26 minSdk = 26
targetSdk = 34 targetSdk = 34
versionCode = 15950 versionCode = 15960
versionName = "v15.9.5" versionName = "v15.9.6"
multiDexEnabled = false multiDexEnabled = false
buildFeatures { buildFeatures {

View File

@ -88,25 +88,28 @@ public:
void preAppSpecialize(zygisk::AppSpecializeArgs *args) override { void preAppSpecialize(zygisk::AppSpecializeArgs *args) override {
const char *dir, *name; if (args != nullptr) {
bool isGms, isGmsUnstable;
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);
if (!name) goto exit; api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT);
isGmsUnstable = strcmp(name, "com.google.android.gms.unstable") == 0; auto name = env->GetStringUTFChars(args->nice_name, nullptr);
if (name != nullptr) {
bool isGmsUnstable =
std::string_view(name) == "com.google.android.gms.unstable";
env->ReleaseStringUTFChars(args->nice_name, name);
if (isGmsUnstable) { if (isGmsUnstable) {
@ -120,11 +123,7 @@ public:
LOGD("Dex file size: %ld", dexSize); LOGD("Dex file size: %ld", dexSize);
LOGD("Json file size: %ld", jsonSize); LOGD("Json file size: %ld", jsonSize);
if (dexSize < 1 || jsonSize < 1) { if (dexSize > 0 && jsonSize > 0) {
close(fd);
LOGD("Invalid files!");
goto exit;
}
dexVector.resize(dexSize); dexVector.resize(dexSize);
read(fd, dexVector.data(), dexSize); read(fd, dexVector.data(), dexSize);
@ -134,24 +133,20 @@ public:
jsonVector.resize(jsonSize); jsonVector.resize(jsonSize);
read(fd, jsonVector.data(), jsonSize); read(fd, jsonVector.data(), jsonSize);
close(fd);
json = nlohmann::json::parse(jsonVector, nullptr, false, true); json = nlohmann::json::parse(jsonVector, nullptr, false, true);
parseJson(); parseJson();
}
close(fd);
return; return;
}
} else { }
api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT); }
goto exit; }
} }
} else {
goto exit;
}
exit:
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY); api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
} }

View File

@ -7,8 +7,6 @@ If not, try removing /data/adb/pif.json file.
Donations: Donations:
https://www.paypal.com/paypalme/chiteroman https://www.paypal.com/paypalme/chiteroman
# v15.9.5 # v15.9.6
- Strip libraries and reduce their size. - Fix BASIC verdict not passing.
- Fix attestation not passing on some devices.
- Do not auto remove conflict apps, users should remove them manually.

View File

@ -1,7 +1,7 @@
id=playintegrityfix id=playintegrityfix
name=Play Integrity Fix name=Play Integrity Fix
version=v15.9.5 version=v15.9.6
versionCode=15950 versionCode=15960
author=chiteroman author=chiteroman
description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-14. 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 updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json

View File

@ -41,16 +41,16 @@ fi
done done
# SafetyNet/Play Integrity | Avoid breaking Realme fingerprint scanners # 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 # 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 # 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 # SafetyNet/Play Integrity | Avoid breaking OnePlus display modes/fingerprint scanners on OOS 12
resetprop ro.boot.verifiedbootstate green resetprop_if_diff ro.boot.verifiedbootstate green
resetprop ro.boot.veritymode enforcing resetprop_if_diff ro.boot.veritymode enforcing
resetprop vendor.boot.vbmeta.device_state locked resetprop_if_diff vendor.boot.vbmeta.device_state locked
}& }&

View File

@ -1,6 +1,6 @@
{ {
"version": "v15.9.5", "version": "v15.9.6",
"versionCode": 15950, "versionCode": 15960,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v15.9.5/PlayIntegrityFix_v15.9.5.zip", "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" "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
} }