mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-18 02:52:39 +02:00
Convert to Linux line endings (LF)
find . -type f -exec dos2unix {} \;
This commit is contained in:
parent
15579aa13b
commit
7ed05a41d7
@ -1,136 +1,136 @@
|
|||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
}
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
namespace = "es.chiteroman.playintegrityfix"
|
namespace = "es.chiteroman.playintegrityfix"
|
||||||
compileSdk = 35
|
compileSdk = 35
|
||||||
buildToolsVersion = "35.0.0"
|
buildToolsVersion = "35.0.0"
|
||||||
ndkVersion = "27.1.12297006"
|
ndkVersion = "27.1.12297006"
|
||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
prefab = true
|
prefab = true
|
||||||
}
|
}
|
||||||
|
|
||||||
packaging {
|
packaging {
|
||||||
resources {
|
resources {
|
||||||
excludes += "**"
|
excludes += "**"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId = "es.chiteroman.playintegrityfix"
|
applicationId = "es.chiteroman.playintegrityfix"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 17700
|
versionCode = 17700
|
||||||
versionName = "v17.7"
|
versionName = "v17.7"
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
abiFilters(
|
abiFilters(
|
||||||
"arm64-v8a",
|
"arm64-v8a",
|
||||||
"armeabi-v7a"
|
"armeabi-v7a"
|
||||||
)
|
)
|
||||||
|
|
||||||
arguments(
|
arguments(
|
||||||
"-DCMAKE_BUILD_TYPE=Release",
|
"-DCMAKE_BUILD_TYPE=Release",
|
||||||
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
|
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
|
||||||
"-DANDROID_STL=none",
|
"-DANDROID_STL=none",
|
||||||
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
|
||||||
)
|
)
|
||||||
|
|
||||||
cFlags(
|
cFlags(
|
||||||
"-std=gnu23",
|
"-std=gnu23",
|
||||||
"-fvisibility=hidden",
|
"-fvisibility=hidden",
|
||||||
"-fvisibility-inlines-hidden"
|
"-fvisibility-inlines-hidden"
|
||||||
)
|
)
|
||||||
|
|
||||||
cppFlags(
|
cppFlags(
|
||||||
"-std=gnu++26",
|
"-std=gnu++26",
|
||||||
"-fno-exceptions",
|
"-fno-exceptions",
|
||||||
"-fno-rtti",
|
"-fno-rtti",
|
||||||
"-fvisibility=hidden",
|
"-fvisibility=hidden",
|
||||||
"-fvisibility-inlines-hidden"
|
"-fvisibility-inlines-hidden"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
isMinifyEnabled = true
|
isMinifyEnabled = true
|
||||||
isShrinkResources = true
|
isShrinkResources = true
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
proguardFiles(
|
proguardFiles(
|
||||||
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_17
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
}
|
}
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
cmake {
|
cmake {
|
||||||
path = file("src/main/cpp/CMakeLists.txt")
|
path = file("src/main/cpp/CMakeLists.txt")
|
||||||
version = "3.30.3"
|
version = "3.30.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(libs.cxx)
|
implementation(libs.cxx)
|
||||||
implementation(libs.hiddenapibypass)
|
implementation(libs.hiddenapibypass)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("updateModuleProp") {
|
tasks.register("updateModuleProp") {
|
||||||
doLast {
|
doLast {
|
||||||
val versionName = project.android.defaultConfig.versionName
|
val versionName = project.android.defaultConfig.versionName
|
||||||
val versionCode = project.android.defaultConfig.versionCode
|
val versionCode = project.android.defaultConfig.versionCode
|
||||||
|
|
||||||
val modulePropFile = project.rootDir.resolve("module/module.prop")
|
val modulePropFile = project.rootDir.resolve("module/module.prop")
|
||||||
|
|
||||||
var content = modulePropFile.readText()
|
var content = modulePropFile.readText()
|
||||||
|
|
||||||
content = content.replace(Regex("version=.*"), "version=$versionName")
|
content = content.replace(Regex("version=.*"), "version=$versionName")
|
||||||
content = content.replace(Regex("versionCode=.*"), "versionCode=$versionCode")
|
content = content.replace(Regex("versionCode=.*"), "versionCode=$versionCode")
|
||||||
|
|
||||||
modulePropFile.writeText(content)
|
modulePropFile.writeText(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("copyFiles") {
|
tasks.register("copyFiles") {
|
||||||
dependsOn("updateModuleProp")
|
dependsOn("updateModuleProp")
|
||||||
|
|
||||||
doLast {
|
doLast {
|
||||||
val moduleFolder = project.rootDir.resolve("module")
|
val moduleFolder = project.rootDir.resolve("module")
|
||||||
val dexFile =
|
val dexFile =
|
||||||
project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
|
project.layout.buildDirectory.get().asFile.resolve("intermediates/dex/release/minifyReleaseWithR8/classes.dex")
|
||||||
val soDir =
|
val soDir =
|
||||||
project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib")
|
project.layout.buildDirectory.get().asFile.resolve("intermediates/stripped_native_libs/release/stripReleaseDebugSymbols/out/lib")
|
||||||
|
|
||||||
dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true)
|
dexFile.copyTo(moduleFolder.resolve("classes.dex"), overwrite = true)
|
||||||
|
|
||||||
soDir.walk().filter { it.isFile && it.extension == "so" }.forEach { soFile ->
|
soDir.walk().filter { it.isFile && it.extension == "so" }.forEach { soFile ->
|
||||||
val abiFolder = soFile.parentFile.name
|
val abiFolder = soFile.parentFile.name
|
||||||
val destination = moduleFolder.resolve("zygisk/$abiFolder.so")
|
val destination = moduleFolder.resolve("zygisk/$abiFolder.so")
|
||||||
soFile.copyTo(destination, overwrite = true)
|
soFile.copyTo(destination, overwrite = true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Zip>("zip") {
|
tasks.register<Zip>("zip") {
|
||||||
dependsOn("copyFiles")
|
dependsOn("copyFiles")
|
||||||
|
|
||||||
archiveFileName.set("PlayIntegrityFix_${project.android.defaultConfig.versionName}.zip")
|
archiveFileName.set("PlayIntegrityFix_${project.android.defaultConfig.versionName}.zip")
|
||||||
destinationDirectory.set(project.rootDir.resolve("out"))
|
destinationDirectory.set(project.rootDir.resolve("out"))
|
||||||
|
|
||||||
from(project.rootDir.resolve("module"))
|
from(project.rootDir.resolve("module"))
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
tasks["assembleRelease"].finalizedBy("updateModuleProp", "copyFiles", "zip")
|
tasks["assembleRelease"].finalizedBy("updateModuleProp", "copyFiles", "zip")
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest />
|
<manifest />
|
@ -1,37 +1,37 @@
|
|||||||
cmake_minimum_required(VERSION 3.30.3)
|
cmake_minimum_required(VERSION 3.30.3)
|
||||||
|
|
||||||
project("playintegrityfix")
|
project("playintegrityfix")
|
||||||
|
|
||||||
find_package(cxx REQUIRED CONFIG)
|
find_package(cxx REQUIRED CONFIG)
|
||||||
|
|
||||||
link_libraries(cxx::cxx)
|
link_libraries(cxx::cxx)
|
||||||
|
|
||||||
if (${ANDROID_ABI} STREQUAL "arm64-v8a")
|
if (${ANDROID_ABI} STREQUAL "arm64-v8a")
|
||||||
set(ARCH "arm64")
|
set(ARCH "arm64")
|
||||||
elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a")
|
elseif (${ANDROID_ABI} STREQUAL "armeabi-v7a")
|
||||||
set(ARCH "arm")
|
set(ARCH "arm")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
file(GLOB SHADOWHOOK_SRC
|
file(GLOB SHADOWHOOK_SRC
|
||||||
shadowhook/*.c
|
shadowhook/*.c
|
||||||
shadowhook/arch/${ARCH}/*.c
|
shadowhook/arch/${ARCH}/*.c
|
||||||
shadowhook/common/*.c
|
shadowhook/common/*.c
|
||||||
shadowhook/third_party/xdl/*.c
|
shadowhook/third_party/xdl/*.c
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(${CMAKE_PROJECT_NAME} SHARED
|
add_library(${CMAKE_PROJECT_NAME} SHARED
|
||||||
main.cpp
|
main.cpp
|
||||||
${SHADOWHOOK_SRC}
|
${SHADOWHOOK_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
||||||
shadowhook
|
shadowhook
|
||||||
shadowhook/arch/${ARCH}
|
shadowhook/arch/${ARCH}
|
||||||
shadowhook/include
|
shadowhook/include
|
||||||
shadowhook/common
|
shadowhook/common
|
||||||
shadowhook/third_party/bsd
|
shadowhook/third_party/bsd
|
||||||
shadowhook/third_party/lss
|
shadowhook/third_party/lss
|
||||||
shadowhook/third_party/xdl
|
shadowhook/third_party/xdl
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log)
|
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log)
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.7.0"
|
agp = "8.7.0"
|
||||||
cxx = "27.0.12077973"
|
cxx = "27.0.12077973"
|
||||||
hiddenapibypass = "4.3"
|
hiddenapibypass = "4.3"
|
||||||
|
|
||||||
[libraries]
|
[libraries]
|
||||||
cxx = { group = "org.lsposed.libcxx", name = "libcxx", version.ref = "cxx" }
|
cxx = { group = "org.lsposed.libcxx", name = "libcxx", version.ref = "cxx" }
|
||||||
hiddenapibypass = { group = "org.lsposed.hiddenapibypass", name = "hiddenapibypass", version.ref = "hiddenapibypass" }
|
hiddenapibypass = { group = "org.lsposed.hiddenapibypass", name = "hiddenapibypass", version.ref = "hiddenapibypass" }
|
||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
|
12
gradle/wrapper/gradle-wrapper.properties
vendored
12
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Thu Oct 03 16:27:21 CEST 2024
|
#Thu Oct 03 16:27:21 CEST 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
178
gradlew.bat
vendored
178
gradlew.bat
vendored
@ -1,89 +1,89 @@
|
|||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
@rem you may not use this file except in compliance with the License.
|
@rem you may not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@rem Unless required by applicable law or agreed to in writing, software
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
Loading…
Reference in New Issue
Block a user