This commit is contained in:
chiteroman 2024-09-19 01:31:11 +02:00
parent c830292dd9
commit eff20178eb
7 changed files with 37 additions and 26 deletions

View File

@ -6,7 +6,7 @@ android {
namespace = "es.chiteroman.playintegrityfix"
compileSdk = 35
buildToolsVersion = "35.0.0"
ndkVersion = "27.0.12077973"
ndkVersion = "27.1.12297006"
buildFeatures {
prefab = true
@ -22,8 +22,8 @@ android {
applicationId = "es.chiteroman.playintegrityfix"
minSdk = 26
targetSdk = 35
versionCode = 17500
versionName = "v17.5"
versionCode = 17600
versionName = "v17.6"
multiDexEnabled = false
externalNativeBuild {
@ -34,7 +34,8 @@ android {
)
arguments(
"-DCMAKE_BUILD_TYPE=MinSizeRel",
"-DCMAKE_BUILD_TYPE=Release",
"-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON",
"-DANDROID_STL=none",
"-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
)
@ -75,7 +76,7 @@ android {
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
version = "3.30.3"
}
}
}

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.30.3)
project("playintegrityfix")
@ -25,7 +25,7 @@ add_library(${CMAKE_PROJECT_NAME} SHARED
)
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
shadowhook/.
shadowhook
shadowhook/arch/${ARCH}
shadowhook/include
shadowhook/common

View File

@ -47,12 +47,14 @@ static std::string DEVICE_INITIAL_SDK_INT, SECURITY_PATCH, BUILD_ID;
typedef void (*T_Callback)(void *, const char *, const char *, uint32_t);
static volatile T_Callback o_callback = nullptr;
static T_Callback o_callback = nullptr;
static void *o_cookie = nullptr;
static void modify_callback(void *cookie, const char *name, const char *value, uint32_t serial) {
if (cookie == nullptr || name == nullptr || value == nullptr || o_callback == nullptr)
return;
if (!cookie || !name || !value || !o_callback || !o_cookie) return;
if (cookie != o_cookie) return;
std::string_view prop(name);
@ -68,26 +70,30 @@ static void modify_callback(void *cookie, const char *name, const char *value, u
if (!BUILD_ID.empty()) {
value = BUILD_ID.c_str();
}
} else {
}
if (DEBUG) LOGD("[%s]: '%s'", name, value);
return o_callback(cookie, name, value, serial);
}
LOGD("[%s]: '%s'", name, value);
return o_callback(cookie, name, value, serial);
}
static void (*o_system_property_read_callback)(const prop_info *, T_Callback, void *) = nullptr;
static void (*o_system_property_read_callback)(prop_info *, T_Callback, void *) = nullptr;
static void
my_system_property_read_callback(const prop_info *pi, T_Callback callback, void *cookie) {
if (pi && callback && cookie) o_callback = callback;
static void my_system_property_read_callback(prop_info *pi, T_Callback callback, void *cookie) {
if (pi && callback && cookie) {
o_callback = callback;
o_cookie = cookie;
}
return o_system_property_read_callback(pi, modify_callback, cookie);
}
static bool doHook() {
shadowhook_init(SHADOWHOOK_MODE_UNIQUE, false);
if (shadowhook_init(SHADOWHOOK_MODE_UNIQUE, true) != 0) {
LOGE("shadowhook failed to init!");
return false;
}
LOGD("loaded shadowhook version: %s", SHADOWHOOK_VERSION);
void *ptr = shadowhook_hook_sym_name(
"libc.so",

View File

@ -15,7 +15,10 @@ 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.5
# v17.6
- Update fingerprint
- Remove keybox logic
- Update AGP, NDK & CMake
- Change build from MinSizeRel to Release (better performance)
- Enable LTO
- Refactor code

View File

@ -1,7 +1,7 @@
id=playintegrityfix
name=Play Integrity Fix
version=v17.5
versionCode=17500
version=v17.6
versionCode=17600
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

1
module/sepolicy.rule Normal file
View File

@ -0,0 +1 @@
allow gmscore_app gmscore_app process execmem

View File

@ -1,6 +1,6 @@
{
"version": "v17.5",
"versionCode": 17500,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.5/PlayIntegrityFix_v17.5.zip",
"version": "v17.6",
"versionCode": 17600,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.6/PlayIntegrityFix_v17.6.zip",
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
}