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

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); 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) { 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) if (!cookie || !name || !value || !o_callback || !o_cookie) return;
return;
if (cookie != o_cookie) return;
std::string_view prop(name); 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()) { if (!BUILD_ID.empty()) {
value = BUILD_ID.c_str(); 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); if (DEBUG) LOGD("[%s]: '%s'", name, value);
return o_callback(cookie, name, value, serial); 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 static void my_system_property_read_callback(prop_info *pi, T_Callback callback, void *cookie) {
my_system_property_read_callback(const prop_info *pi, T_Callback callback, void *cookie) { if (pi && callback && cookie) {
if (pi && callback && cookie) o_callback = callback; o_callback = callback;
o_cookie = cookie;
}
return o_system_property_read_callback(pi, modify_callback, cookie); return o_system_property_read_callback(pi, modify_callback, cookie);
} }
static bool doHook() { 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( void *ptr = shadowhook_hook_sym_name(
"libc.so", "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. isn't passing, maybe you should change the ROM.
Stock ROMs gives the best results. 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 - Refactor code

View File

@ -1,7 +1,7 @@
id=playintegrityfix id=playintegrityfix
name=Play Integrity Fix name=Play Integrity Fix
version=v17.5 version=v17.6
versionCode=17500 versionCode=17600
author=chiteroman author=chiteroman
description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-15 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 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", "version": "v17.6",
"versionCode": 17500, "versionCode": 17600,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.5/PlayIntegrityFix_v17.5.zip", "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.6/PlayIntegrityFix_v17.6.zip",
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md" "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
} }