Skip to content

Commit

Permalink
v17.6
Browse files Browse the repository at this point in the history
  • Loading branch information
chiteroman committed Sep 18, 2024
1 parent c830292 commit eff2017
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 26 deletions.
11 changes: 6 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 {
Expand All @@ -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"
)
Expand Down Expand Up @@ -75,7 +76,7 @@ android {
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
version = "3.30.3"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.22.1)
cmake_minimum_required(VERSION 3.30.3)

project("playintegrityfix")

Expand All @@ -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
Expand Down
30 changes: 18 additions & 12 deletions app/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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);
if (DEBUG) 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",
Expand Down
7 changes: 5 additions & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions module/module.prop
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions module/sepolicy.rule
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allow gmscore_app gmscore_app process execmem
6 changes: 3 additions & 3 deletions update.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit eff2017

Please sign in to comment.