diff --git a/app/build.gradle.kts b/app/build.gradle.kts index c6b7439..f994626 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 { diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp index 8be494b..f72fa34 100644 --- a/app/src/main/cpp/main.cpp +++ b/app/src/main/cpp/main.cpp @@ -88,70 +88,65 @@ public: 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)); + + LOGD("Dex file size: %ld", dexSize); + LOGD("Json file size: %ld", jsonSize); + + if (dexSize > 0 && jsonSize > 0) { + + dexVector.resize(dexSize); + read(fd, dexVector.data(), dexSize); + + std::vector jsonVector; + + jsonVector.resize(jsonSize); + read(fd, jsonVector.data(), jsonSize); + + json = nlohmann::json::parse(jsonVector, nullptr, false, true); + + parseJson(); + } + + close(fd); + + return; + } + } } - - dexVector.resize(dexSize); - read(fd, dexVector.data(), dexSize); - - std::vector jsonVector; - - jsonVector.resize(jsonSize); - read(fd, jsonVector.data(), jsonSize); - - close(fd); - - json = nlohmann::json::parse(jsonVector, nullptr, false, true); - - parseJson(); - - return; - - } else { - api->setOption(zygisk::FORCE_DENYLIST_UNMOUNT); - goto exit; } - - } else { - goto exit; } - exit: api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY); } diff --git a/changelog.md b/changelog.md index f00ba01..e2c7f07 100644 --- a/changelog.md +++ b/changelog.md @@ -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. \ No newline at end of file +- Fix BASIC verdict not passing. \ No newline at end of file diff --git a/module/module.prop b/module/module.prop index 1820a00..c15ff6c 100644 --- a/module/module.prop +++ b/module/module.prop @@ -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 diff --git a/module/service.sh b/module/service.sh index 621183a..a38879b 100644 --- a/module/service.sh +++ b/module/service.sh @@ -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 }& diff --git a/update.json b/update.json index d02f0fd..e538421 100644 --- a/update.json +++ b/update.json @@ -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" }