From 668a338d8ae72e607c0b0c3a56c71411fb5e403b Mon Sep 17 00:00:00 2001 From: chiteroman Date: Sun, 17 Nov 2024 01:41:01 +0100 Subject: [PATCH] v18.0 --- app/build.gradle.kts | 13 +++---- app/src/main/cpp/CMakeLists.txt | 2 +- changelog.md | 18 +++++++--- gradle/wrapper/gradle-wrapper.properties | 4 +-- module/customize.sh | 46 +++++++++++++++++++----- module/module.prop | 4 +-- module/pif.json | 6 ++-- module/post-fs-data.sh | 8 ----- module/service.sh | 16 --------- update.json | 6 ++-- 10 files changed, 70 insertions(+), 53 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index de1df59..d372106 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,8 +25,8 @@ android { applicationId = "es.chiteroman.playintegrityfix" minSdk = 26 targetSdk = 35 - versionCode = 17900 - versionName = "v17.9" + versionCode = 18000 + versionName = "v18.0" multiDexEnabled = false externalNativeBuild { @@ -34,17 +34,18 @@ android { arguments( "-DCMAKE_BUILD_TYPE=Release", "-DANDROID_STL=none", - "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" + "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON", + "-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON" ) cFlags( - "-std=gnu23", + "-std=c23", "-fvisibility=hidden", "-fvisibility-inlines-hidden" ) cppFlags( - "-std=gnu++26", + "-std=c++23", "-fno-exceptions", "-fno-rtti", "-fvisibility=hidden", @@ -73,7 +74,7 @@ android { externalNativeBuild { cmake { path = file("src/main/cpp/CMakeLists.txt") - version = "3.22.1" + version = "3.31.0" } } } diff --git a/app/src/main/cpp/CMakeLists.txt b/app/src/main/cpp/CMakeLists.txt index c18cd07..c57c18c 100644 --- a/app/src/main/cpp/CMakeLists.txt +++ b/app/src/main/cpp/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.22.1) +cmake_minimum_required(VERSION 3.31.0) project("playintegrityfix") diff --git a/changelog.md b/changelog.md index 3fa6106..f7f31f2 100644 --- a/changelog.md +++ b/changelog.md @@ -11,8 +11,18 @@ If you are using TrickyStore and you have a valid keybox, but Strong isn't passing, maybe you should change the ROM. Stock ROMs gives the best results. -# v17.9 +# v18.0 -- Update fingerprint to latest beta (thanks to XiaomiEU devs) -- Fix Shamiko whitelist bug -- Fix bootloops on XiaomiEU custom roms +- Module won't delete ro.build.selinux prop, if you can't pass attestation, you can try deleting it + manually. + More info here: https://github.com/chiteroman/PlayIntegrityFix/pull/470 + +- Update fingerprint to latest oriole (Pixel 6) beta rom + +- Remove auto conflict apps (cause bootloops, just remove them manually) + +- Improve Zygisk check + +- Upgrade Gradle, AGP and CMake + +- Enable LTO for Zygisk lib diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a53991c..4264b77 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Oct 03 16:27:21 CEST 2024 +#Sun Nov 17 01:17:20 CET 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/module/customize.sh b/module/customize.sh index c8e8f78..fcd6446 100644 --- a/module/customize.sh +++ b/module/customize.sh @@ -6,20 +6,50 @@ if ! $BOOTMODE; then ui_print "! Please install from Magisk / KernelSU / APatch app" abort "*********************************************************" fi -# Module requires Zygisk to work -if [ ! -d "/data/adb/modules/zygisksu" ]; then - if [ -d "/data/adb/magisk" ]; then - [ ! "$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';")" == "value=0" ] || abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module." - else - abort "! Zygisk is not enabled. Please, enable Zygisk in Magisk settings or install ZygiskNext or ReZygisk module." - fi -fi # Error on < Android 8 if [ "$API" -lt 26 ]; then abort "! You can't use this module on Android < 8.0" fi +check_zygisk() { + local ZYGISK_MODULE="/data/adb/modules/zygisksu" + local MAGISK_DIR="/data/adb/magisk" + local ZYGISK_MSG="Zygisk is not enabled. Please either: + - Enable Zygisk in Magisk settings + - Install ZygiskNext or ReZygisk module" + + # Check if Zygisk module directory exists + if [ -d "$ZYGISK_MODULE" ]; then + return 0 + fi + + # If Magisk is installed, check Zygisk settings + if [ -d "$MAGISK_DIR" ]; then + # Query Zygisk status from Magisk database + local ZYGISK_STATUS + ZYGISK_STATUS=$(magisk --sqlite "SELECT value FROM settings WHERE key='zygisk';") + + # Check if Zygisk is disabled + if [ "$ZYGISK_STATUS" = "value=0" ]; then + abort "$ZYGISK_MSG" + fi + else + abort "$ZYGISK_MSG" + fi +} + +# Module requires Zygisk to work +check_zygisk + +# safetynet-fix module is obsolete and it's incompatible with PIF +SNFix="/data/adb/modules/safetynet-fix" +if [ -d "$SNFix" ]; then + ui_print "! safetynet-fix module is obsolete and it's incompatible with PIF, it will be removed on next reboot" + ui_print "! Do not install it" + touch "$SNFix"/remove +fi + # playcurl warn if [ -d "/data/adb/modules/playcurl" ]; then ui_print "! playcurl may overwrite fingerprint with invalid one, be careful!" diff --git a/module/module.prop b/module/module.prop index b9aa9a3..b33ca2c 100644 --- a/module/module.prop +++ b/module/module.prop @@ -1,7 +1,7 @@ id=playintegrityfix name=Play Integrity Fix -version=v17.9 -versionCode=17900 +version=v18.0 +versionCode=18000 author=chiteroman description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-15 updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json diff --git a/module/pif.json b/module/pif.json index 963bdbe..83043de 100644 --- a/module/pif.json +++ b/module/pif.json @@ -1,7 +1,7 @@ { - "FINGERPRINT": "google/akita_beta/akita:15/AP41.240925.009/12534705:user/release-keys", + "FINGERPRINT": "google/oriole_beta/oriole:15/BP11.241025.006/12620009:user/release-keys", "MANUFACTURER": "Google", - "MODEL": "Pixel 8a", - "SECURITY_PATCH": "2024-10-05", + "MODEL": "Pixel 6", + "SECURITY_PATCH": "2024-11-05", "DEVICE_INITIAL_SDK_INT": 21 } diff --git a/module/post-fs-data.sh b/module/post-fs-data.sh index b1adcae..eb84c4c 100644 --- a/module/post-fs-data.sh +++ b/module/post-fs-data.sh @@ -12,14 +12,6 @@ else fi fi -# safetynet-fix module is obsolete and it's incompatible with PIF -SNFix="/data/adb/modules/safetynet-fix" -if [ -d "$SNFix" ]; then - touch "$SNFix"/remove -fi - -rm -rf "$MODPATH"/system - # Conditional early sensitive properties # Samsung diff --git a/module/service.sh b/module/service.sh index 41a2090..1b3c1f7 100644 --- a/module/service.sh +++ b/module/service.sh @@ -39,19 +39,3 @@ resetprop_if_diff vendor.boot.vbmeta.device_state locked # Other resetprop_if_diff sys.oem_unlock_allowed 0 - -# Disable and uninstall conflict apps -APPS=" -eu.xiaomi.module.inject -com.elitedevelopment.module -" - -for APP in $APPS; do - if pm list packages | grep -q "$APP"; then - pm disable --user 0 "$APP" - pm disable "$APP" - - pm uninstall --user 0 "$APP" - pm uninstall "$APP" - fi -done diff --git a/update.json b/update.json index dbcd42b..45ee5a2 100644 --- a/update.json +++ b/update.json @@ -1,6 +1,6 @@ { - "version": "v17.9", - "versionCode": 17900, - "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.9/PlayIntegrityFix_v17.9.zip", + "version": "v18.0", + "versionCode": 18000, + "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v18.0/PlayIntegrityFix_v18.0.zip", "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md" }