-
-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
280 additions
and
280 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,136 +1,136 @@ | ||
plugins { | ||
alias(libs.plugins.android.application) | ||
} | ||
|
||
android { | ||
namespace = "es.chiteroman.playintegrityfix" | ||
compileSdk = 35 | ||
buildToolsVersion = "35.0.0" | ||
ndkVersion = "27.1.12297006" | ||
|
||
buildFeatures { | ||
prefab = true | ||
} | ||
|
||
packaging { | ||
resources { | ||
excludes += "**" | ||
} | ||
} | ||
|
||
defaultConfig { | ||
applicationId = "es.chiteroman.playintegrityfix" | ||
minSdk = 26 | ||
targetSdk = 35 | ||
versionCode = 17700 | ||
versionName = "v17.7" | ||
multiDexEnabled = false | ||
|
||
externalNativeBuild { | ||
cmake { | ||
abiFilters( | ||
"arm64-v8a", | ||
"armeabi-v7a" | ||
) | ||
|
||
arguments( | ||
"-DCMAKE_BUILD_TYPE=Release", | ||
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON", | ||
"-DANDROID_STL=none", | ||
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" | ||
) | ||
|
||
cFlags( | ||
"-std=gnu23", | ||
"-fvisibility=hidden", | ||
"-fvisibility-inlines-hidden" | ||
) | ||
|
||
cppFlags( | ||
"-std=gnu++26", | ||
"-fno-exceptions", | ||
"-fno-rtti", | ||
"-fvisibility=hidden", | ||
"-fvisibility-inlines-hidden" | ||
) | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
multiDexEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path = file("src/main/cpp/CMakeLists.txt") | ||
version = "3.30.3" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.cxx) | ||
implementation(libs.hiddenapibypass) | ||
} | ||
|
||
tasks.register("updateModuleProp") { | ||
doLast { | ||
val versionName = project.android.defaultConfig.versionName | ||
val versionCode = project.android.defaultConfig.versionCode | ||
|
||
val modulePropFile = project.rootDir.resolve("module/module.prop") | ||
|
||
var content = modulePropFile.readText() | ||
|
||
content = content.replace(Regex("version=.*"), "version=$versionName") | ||
content = content.replace(Regex("versionCode=.*"), "versionCode=$versionCode") | ||
|
||
modulePropFile.writeText(content) | ||
} | ||
} | ||
|
||
tasks.register("copyFiles") { | ||
dependsOn("updateModuleProp") | ||
|
||
doLast { | ||
val moduleFolder = project.rootDir.resolve("module") | ||
val dexFile = | ||
project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex") | ||
val soDir = | ||
project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib") | ||
|
||
dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true) | ||
|
||
soDir.walk().filter { it.isFile && it.extension == "so" }.forEach { soFile -> | ||
val abiFolder = soFile.parentFile.name | ||
val destination = moduleFolder.resolve("zygisk/$abiFolder.so") | ||
soFile.copyTo(destination, overwrite = true) | ||
} | ||
} | ||
} | ||
|
||
tasks.register<Zip>("zip") { | ||
dependsOn("copyFiles") | ||
|
||
archiveFileName.set("PlayIntegrityFix_${project.android.defaultConfig.versionName}.zip") | ||
destinationDirectory.set(project.rootDir.resolve("out")) | ||
|
||
from(project.rootDir.resolve("module")) | ||
} | ||
|
||
afterEvaluate { | ||
tasks["assembleRelease"].finalizedBy("updateModuleProp", "copyFiles", "zip") | ||
} | ||
plugins { | ||
alias(libs.plugins.android.application) | ||
} | ||
|
||
android { | ||
namespace = "es.chiteroman.playintegrityfix" | ||
compileSdk = 35 | ||
buildToolsVersion = "35.0.0" | ||
ndkVersion = "27.1.12297006" | ||
|
||
buildFeatures { | ||
prefab = true | ||
} | ||
|
||
packaging { | ||
resources { | ||
excludes += "**" | ||
} | ||
} | ||
|
||
defaultConfig { | ||
applicationId = "es.chiteroman.playintegrityfix" | ||
minSdk = 26 | ||
targetSdk = 35 | ||
versionCode = 17700 | ||
versionName = "v17.7" | ||
multiDexEnabled = false | ||
|
||
externalNativeBuild { | ||
cmake { | ||
abiFilters( | ||
"arm64-v8a", | ||
"armeabi-v7a" | ||
) | ||
|
||
arguments( | ||
"-DCMAKE_BUILD_TYPE=Release", | ||
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON", | ||
"-DANDROID_STL=none", | ||
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON" | ||
) | ||
|
||
cFlags( | ||
"-std=gnu23", | ||
"-fvisibility=hidden", | ||
"-fvisibility-inlines-hidden" | ||
) | ||
|
||
cppFlags( | ||
"-std=gnu++26", | ||
"-fno-exceptions", | ||
"-fno-rtti", | ||
"-fvisibility=hidden", | ||
"-fvisibility-inlines-hidden" | ||
) | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = true | ||
isShrinkResources = true | ||
multiDexEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" | ||
) | ||
} | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
externalNativeBuild { | ||
cmake { | ||
path = file("src/main/cpp/CMakeLists.txt") | ||
version = "3.30.3" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation(libs.cxx) | ||
implementation(libs.hiddenapibypass) | ||
} | ||
|
||
tasks.register("updateModuleProp") { | ||
doLast { | ||
val versionName = project.android.defaultConfig.versionName | ||
val versionCode = project.android.defaultConfig.versionCode | ||
|
||
val modulePropFile = project.rootDir.resolve("module/module.prop") | ||
|
||
var content = modulePropFile.readText() | ||
|
||
content = content.replace(Regex("version=.*"), "version=$versionName") | ||
content = content.replace(Regex("versionCode=.*"), "versionCode=$versionCode") | ||
|
||
modulePropFile.writeText(content) | ||
} | ||
} | ||
|
||
tasks.register("copyFiles") { | ||
dependsOn("updateModuleProp") | ||
|
||
doLast { | ||
val moduleFolder = project.rootDir.resolve("module") | ||
val dexFile = | ||
project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex") | ||
val soDir = | ||
project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib") | ||
|
||
dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true) | ||
|
||
soDir.walk().filter { it.isFile && it.extension == "so" }.forEach { soFile -> | ||
val abiFolder = soFile.parentFile.name | ||
val destination = moduleFolder.resolve("zygisk/$abiFolder.so") | ||
soFile.copyTo(destination, overwrite = true) | ||
} | ||
} | ||
} | ||
|
||
tasks.register<Zip>("zip") { | ||
dependsOn("copyFiles") | ||
|
||
archiveFileName.set("PlayIntegrityFix_${project.android.defaultConfig.versionName}.zip") | ||
destinationDirectory.set(project.rootDir.resolve("out")) | ||
|
||
from(project.rootDir.resolve("module")) | ||
} | ||
|
||
afterEvaluate { | ||
tasks["assembleRelease"].finalizedBy("updateModuleProp", "copyFiles", "zip") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
cmake_minimum_required(VERSION 3.30.3) | ||
|
||
project("playintegrityfix") | ||
|
||
find_package(cxx REQUIRED CONFIG) | ||
|
||
link_libraries(cxx::cxx) | ||
|
||
if (${ANDROID_ABI} STREQUAL "arm64-v8a") | ||
set(ARCH "arm64") | ||
elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a") | ||
set(ARCH "arm") | ||
endif () | ||
|
||
file(GLOB SHADOWHOOK_SRC | ||
shadowhook/*.c | ||
shadowhook/arch/${ARCH}/*.c | ||
shadowhook/common/*.c | ||
shadowhook/third_party/xdl/*.c | ||
) | ||
|
||
add_library(${CMAKE_PROJECT_NAME} SHARED | ||
main.cpp | ||
${SHADOWHOOK_SRC} | ||
) | ||
|
||
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE | ||
shadowhook | ||
shadowhook/arch/${ARCH} | ||
shadowhook/include | ||
shadowhook/common | ||
shadowhook/third_party/bsd | ||
shadowhook/third_party/lss | ||
shadowhook/third_party/xdl | ||
) | ||
|
||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log) | ||
cmake_minimum_required(VERSION 3.30.3) | ||
|
||
project("playintegrityfix") | ||
|
||
find_package(cxx REQUIRED CONFIG) | ||
|
||
link_libraries(cxx::cxx) | ||
|
||
if (${ANDROID_ABI} STREQUAL "arm64-v8a") | ||
set(ARCH "arm64") | ||
elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a") | ||
set(ARCH "arm") | ||
endif () | ||
|
||
file(GLOB SHADOWHOOK_SRC | ||
shadowhook/*.c | ||
shadowhook/arch/${ARCH}/*.c | ||
shadowhook/common/*.c | ||
shadowhook/third_party/xdl/*.c | ||
) | ||
|
||
add_library(${CMAKE_PROJECT_NAME} SHARED | ||
main.cpp | ||
${SHADOWHOOK_SRC} | ||
) | ||
|
||
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE | ||
shadowhook | ||
shadowhook/arch/${ARCH} | ||
shadowhook/include | ||
shadowhook/common | ||
shadowhook/third_party/bsd | ||
shadowhook/third_party/lss | ||
shadowhook/third_party/xdl | ||
) | ||
|
||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[versions] | ||
agp = "8.7.0" | ||
cxx = "27.0.12077973" | ||
hiddenapibypass = "4.3" | ||
|
||
[libraries] | ||
cxx = { group = "org.lsposed.libcxx", name = "libcxx", version.ref = "cxx" } | ||
hiddenapibypass = { group = "org.lsposed.hiddenapibypass", name = "hiddenapibypass", version.ref = "hiddenapibypass" } | ||
|
||
[plugins] | ||
android-application = { id = "com.android.application", version.ref = "agp" } | ||
[versions] | ||
agp = "8.7.0" | ||
cxx = "27.0.12077973" | ||
hiddenapibypass = "4.3" | ||
|
||
[libraries] | ||
cxx = { group = "org.lsposed.libcxx", name = "libcxx", version.ref = "cxx" } | ||
hiddenapibypass = { group = "org.lsposed.hiddenapibypass", name = "hiddenapibypass", version.ref = "hiddenapibypass" } | ||
|
||
[plugins] | ||
android-application = { id = "com.android.application", version.ref = "agp" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Thu Oct 03 16:27:21 CEST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
#Thu Oct 03 16:27:21 CEST 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.