From a728533ed6b4b835dea9285fbe72ddccd297139c Mon Sep 17 00:00:00 2001
From: chiteroman <98092901+chiteroman@users.noreply.github.com>
Date: Mon, 27 Nov 2023 14:18:58 +0100
Subject: [PATCH] New update! v13.8

---
 .idea/.gitignore                             |  3 ---
 .idea/compiler.xml                           |  6 ------
 .idea/encodings.xml                          |  6 ------
 .idea/gradle.xml                             | 20 --------------------
 .idea/inspectionProfiles/Project_Default.xml | 10 ----------
 .idea/misc.xml                               |  9 ---------
 .idea/vcs.xml                                |  6 ------
 app/build.gradle.kts                         | 12 ++++++++----
 app/src/main/cpp/main.cpp                    |  8 ++++----
 changelog.md                                 | 13 ++++---------
 update.json                                  |  6 +++---
 11 files changed, 19 insertions(+), 80 deletions(-)
 delete mode 100644 .idea/.gitignore
 delete mode 100644 .idea/compiler.xml
 delete mode 100644 .idea/encodings.xml
 delete mode 100644 .idea/gradle.xml
 delete mode 100644 .idea/inspectionProfiles/Project_Default.xml
 delete mode 100644 .idea/misc.xml
 delete mode 100644 .idea/vcs.xml

diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 26d3352..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
deleted file mode 100644
index b589d56..0000000
--- a/.idea/compiler.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="CompilerConfiguration">
-    <bytecodeTargetLevel target="17" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
deleted file mode 100644
index 1c124e7..0000000
--- a/.idea/encodings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="Encoding">
-    <file url="file://$PROJECT_DIR$/app/src/main/cpp/stlsoft/stlsoft/stlsoft.h" charset="windows-1252" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
deleted file mode 100644
index ae388c2..0000000
--- a/.idea/gradle.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="GradleMigrationSettings" migrationVersion="1" />
-  <component name="GradleSettings">
-    <option name="linkedExternalProjectsSettings">
-      <GradleProjectSettings>
-        <option name="testRunner" value="GRADLE" />
-        <option name="distributionType" value="DEFAULT_WRAPPED" />
-        <option name="externalProjectPath" value="$PROJECT_DIR$" />
-        <option name="gradleJvm" value="jbr-17" />
-        <option name="modules">
-          <set>
-            <option value="$PROJECT_DIR$" />
-            <option value="$PROJECT_DIR$/app" />
-          </set>
-        </option>
-      </GradleProjectSettings>
-    </option>
-  </component>
-</project>
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 146ab09..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<component name="InspectionProjectProfileManager">
-  <profile version="1.0">
-    <option name="myName" value="Project Default" />
-    <inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
-      <option name="processCode" value="true" />
-      <option name="processLiterals" value="true" />
-      <option name="processComments" value="true" />
-    </inspection_tool>
-  </profile>
-</component>
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100644
index 8978d23..0000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<project version="4">
-  <component name="ExternalStorageConfigurationManager" enabled="true" />
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
-    <output url="file://$PROJECT_DIR$/build/classes" />
-  </component>
-  <component name="ProjectType">
-    <option name="id" value="Android" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1dd..0000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="VcsDirectoryMappings">
-    <mapping directory="" vcs="Git" />
-  </component>
-</project>
\ No newline at end of file
diff --git a/app/build.gradle.kts b/app/build.gradle.kts
index 68bb64c..e6e4b14 100644
--- a/app/build.gradle.kts
+++ b/app/build.gradle.kts
@@ -44,7 +44,7 @@ android {
     }
 }
 
-afterEvaluate {
+tasks.register("copyFiles") {
     val moduleFolder = project.rootDir.resolve("module")
     val dexFile = project.buildDir.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
     val soDir = project.buildDir.resolve("intermediates/stripped_native_libs/release/out/lib")
@@ -56,13 +56,17 @@ afterEvaluate {
         val destination = moduleFolder.resolve("zygisk/$abiFolder.so")
         soFile.copyTo(destination, overwrite = true)
     }
-
-    tasks["assembleRelease"].dependsOn("module")
 }
 
-tasks.register<Zip>("module") {
+tasks.register<Zip>("zip") {
     archiveFileName.set("PlayIntegrityFix.zip")
     destinationDirectory.set(project.rootDir.resolve("out"))
 
     from(project.rootDir.resolve("module"))
+}
+
+afterEvaluate {
+    tasks.named("assembleRelease") {
+        dependsOn("copyFiles", "zip")
+    }
 }
\ No newline at end of file
diff --git a/app/src/main/cpp/main.cpp b/app/src/main/cpp/main.cpp
index 7136169..ba44e66 100644
--- a/app/src/main/cpp/main.cpp
+++ b/app/src/main/cpp/main.cpp
@@ -27,14 +27,14 @@ static void modify_callback(void *cookie, const char *name, const char *value, u
     std::string_view prop(name);
 
     if (prop.ends_with("api_level")) {
-        if (FIRST_API_LEVEL == "NULL") {
+        if (FIRST_API_LEVEL == "nullptr") {
             value = nullptr;
         } else {
             value = FIRST_API_LEVEL.c_str();
         }
         LOGD("[%s] -> %s", name, value);
     } else if (prop.ends_with("security_patch")) {
-        if (SECURITY_PATCH == "NULL") {
+        if (SECURITY_PATCH == "nullptr") {
             value = nullptr;
         } else {
             value = SECURITY_PATCH.c_str();
@@ -169,7 +169,7 @@ private:
 
         if (json.contains("SECURITY_PATCH")) {
             if (json["SECURITY_PATCH"].is_null()) {
-                SECURITY_PATCH = "NULL";
+                SECURITY_PATCH = "nullptr";
             } else if (json["SECURITY_PATCH"].is_string()) {
                 SECURITY_PATCH = json["SECURITY_PATCH"].get<std::string>();
             } else {
@@ -181,7 +181,7 @@ private:
 
         if (json.contains("FIRST_API_LEVEL")) {
             if (json["FIRST_API_LEVEL"].is_null()) {
-                FIRST_API_LEVEL = "NULL";
+                FIRST_API_LEVEL = "nullptr";
             } else if (json["FIRST_API_LEVEL"].is_string()) {
                 FIRST_API_LEVEL = json["FIRST_API_LEVEL"].get<std::string>();
             } else {
diff --git a/changelog.md b/changelog.md
index 1dab543..26e921f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,15 +2,10 @@ We have a Telegram channel!
 If you want to share your knowledge join:
 https://t.me/playintegrityfix
 
-# v13.7
+# v13.8
 
-- Removed custom resetprop.
-- Removed custom props spoof.
-- Removed weird code.
+Google banned old fingerprints :(
 
-If you want an undetectable resetprop, use Kitsune Magisk.
-If you want to spoof your own props, modify the props in source code and build by yourself.
-Or you can use unstable build, you can download in GitHub repo.
-Should work and don't crash nothing.
+This build has hardcoded the fix into Zygisk native libs like v13.0.
 
-I recommend to clear GMS data and cache before reboot.
\ No newline at end of file
+You can't use pif.json or pif.prop files to spoof custom props.
\ No newline at end of file
diff --git a/update.json b/update.json
index 6af11e0..6e4bb71 100644
--- a/update.json
+++ b/update.json
@@ -1,6 +1,6 @@
 {
-    "version": "v13.7",
-    "versionCode": 137,
-    "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v13.7/PlayIntegrityFix_v13.7.zip",
+    "version": "v13.8",
+    "versionCode": 138,
+    "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v13.8/PlayIntegrityFix_v13.8.zip",
     "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
 }
\ No newline at end of file
-- 
GitLab