mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-18 19:12:38 +02:00
v17.5
This commit is contained in:
parent
621db455f7
commit
cb296225e0
@ -22,8 +22,8 @@ android {
|
|||||||
applicationId = "es.chiteroman.playintegrityfix"
|
applicationId = "es.chiteroman.playintegrityfix"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 17400
|
versionCode = 17500
|
||||||
versionName = "v17.4"
|
versionName = "v17.5"
|
||||||
multiDexEnabled = false
|
multiDexEnabled = false
|
||||||
|
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
@ -42,8 +42,7 @@ android {
|
|||||||
cFlags(
|
cFlags(
|
||||||
"-std=gnu23",
|
"-std=gnu23",
|
||||||
"-fvisibility=hidden",
|
"-fvisibility=hidden",
|
||||||
"-fvisibility-inlines-hidden",
|
"-fvisibility-inlines-hidden"
|
||||||
"-ftrivial-auto-var-init=zero"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
cppFlags(
|
cppFlags(
|
||||||
@ -51,8 +50,7 @@ android {
|
|||||||
"-fno-exceptions",
|
"-fno-exceptions",
|
||||||
"-fno-rtti",
|
"-fno-rtti",
|
||||||
"-fvisibility=hidden",
|
"-fvisibility=hidden",
|
||||||
"-fvisibility-inlines-hidden",
|
"-fvisibility-inlines-hidden"
|
||||||
"-ftrivial-auto-var-init=zero"
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,8 @@ project("playintegrityfix")
|
|||||||
|
|
||||||
find_package(cxx REQUIRED CONFIG)
|
find_package(cxx REQUIRED CONFIG)
|
||||||
|
|
||||||
|
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")
|
||||||
@ -19,12 +21,10 @@ file(GLOB SHADOWHOOK_SRC
|
|||||||
|
|
||||||
add_library(${CMAKE_PROJECT_NAME} SHARED
|
add_library(${CMAKE_PROJECT_NAME} SHARED
|
||||||
main.cpp
|
main.cpp
|
||||||
cJSON/cJSON.c
|
|
||||||
${SHADOWHOOK_SRC}
|
${SHADOWHOOK_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
||||||
cJSON
|
|
||||||
shadowhook/.
|
shadowhook/.
|
||||||
shadowhook/arch/${ARCH}
|
shadowhook/arch/${ARCH}
|
||||||
shadowhook/include
|
shadowhook/include
|
||||||
@ -34,4 +34,4 @@ target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE
|
|||||||
shadowhook/third_party/xdl
|
shadowhook/third_party/xdl
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log cxx::cxx)
|
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log)
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,300 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in
|
|
||||||
all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
||||||
THE SOFTWARE.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef cJSON__h
|
|
||||||
#define cJSON__h
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(__WINDOWS__) && (defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32))
|
|
||||||
#define __WINDOWS__
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
|
|
||||||
/* When compiling for windows, we specify a specific calling convention to avoid issues where we are being called from a project with a different default calling convention. For windows you have 3 define options:
|
|
||||||
|
|
||||||
CJSON_HIDE_SYMBOLS - Define this in the case where you don't want to ever dllexport symbols
|
|
||||||
CJSON_EXPORT_SYMBOLS - Define this on library build when you want to dllexport symbols (default)
|
|
||||||
CJSON_IMPORT_SYMBOLS - Define this if you want to dllimport symbol
|
|
||||||
|
|
||||||
For *nix builds that support visibility attribute, you can define similar behavior by
|
|
||||||
|
|
||||||
setting default visibility to hidden by adding
|
|
||||||
-fvisibility=hidden (for gcc)
|
|
||||||
or
|
|
||||||
-xldscope=hidden (for sun cc)
|
|
||||||
to CFLAGS
|
|
||||||
|
|
||||||
then using the CJSON_API_VISIBILITY flag to "export" the same symbols the way CJSON_EXPORT_SYMBOLS does
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define CJSON_CDECL __cdecl
|
|
||||||
#define CJSON_STDCALL __stdcall
|
|
||||||
|
|
||||||
/* export symbols by default, this is necessary for copy pasting the C and header file */
|
|
||||||
#if !defined(CJSON_HIDE_SYMBOLS) && !defined(CJSON_IMPORT_SYMBOLS) && !defined(CJSON_EXPORT_SYMBOLS)
|
|
||||||
#define CJSON_EXPORT_SYMBOLS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(CJSON_HIDE_SYMBOLS)
|
|
||||||
#define CJSON_PUBLIC(type) type CJSON_STDCALL
|
|
||||||
#elif defined(CJSON_EXPORT_SYMBOLS)
|
|
||||||
#define CJSON_PUBLIC(type) __declspec(dllexport) type CJSON_STDCALL
|
|
||||||
#elif defined(CJSON_IMPORT_SYMBOLS)
|
|
||||||
#define CJSON_PUBLIC(type) __declspec(dllimport) type CJSON_STDCALL
|
|
||||||
#endif
|
|
||||||
#else /* !__WINDOWS__ */
|
|
||||||
#define CJSON_CDECL
|
|
||||||
#define CJSON_STDCALL
|
|
||||||
|
|
||||||
#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(CJSON_API_VISIBILITY)
|
|
||||||
#define CJSON_PUBLIC(type) __attribute__((visibility("default"))) type
|
|
||||||
#else
|
|
||||||
#define CJSON_PUBLIC(type) type
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* project version */
|
|
||||||
#define CJSON_VERSION_MAJOR 1
|
|
||||||
#define CJSON_VERSION_MINOR 7
|
|
||||||
#define CJSON_VERSION_PATCH 18
|
|
||||||
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
/* cJSON Types: */
|
|
||||||
#define cJSON_Invalid (0)
|
|
||||||
#define cJSON_False (1 << 0)
|
|
||||||
#define cJSON_True (1 << 1)
|
|
||||||
#define cJSON_NULL (1 << 2)
|
|
||||||
#define cJSON_Number (1 << 3)
|
|
||||||
#define cJSON_String (1 << 4)
|
|
||||||
#define cJSON_Array (1 << 5)
|
|
||||||
#define cJSON_Object (1 << 6)
|
|
||||||
#define cJSON_Raw (1 << 7) /* raw json */
|
|
||||||
|
|
||||||
#define cJSON_IsReference 256
|
|
||||||
#define cJSON_StringIsConst 512
|
|
||||||
|
|
||||||
/* The cJSON structure: */
|
|
||||||
typedef struct cJSON
|
|
||||||
{
|
|
||||||
/* next/prev allow you to walk array/object chains. Alternatively, use GetArraySize/GetArrayItem/GetObjectItem */
|
|
||||||
struct cJSON *next;
|
|
||||||
struct cJSON *prev;
|
|
||||||
/* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */
|
|
||||||
struct cJSON *child;
|
|
||||||
|
|
||||||
/* The type of the item, as above. */
|
|
||||||
int type;
|
|
||||||
|
|
||||||
/* The item's string, if type==cJSON_String and type == cJSON_Raw */
|
|
||||||
char *valuestring;
|
|
||||||
/* writing to valueint is DEPRECATED, use cJSON_SetNumberValue instead */
|
|
||||||
int valueint;
|
|
||||||
/* The item's number, if type==cJSON_Number */
|
|
||||||
double valuedouble;
|
|
||||||
|
|
||||||
/* The item's name string, if this item is the child of, or is in the list of subitems of an object. */
|
|
||||||
char *string;
|
|
||||||
} cJSON;
|
|
||||||
|
|
||||||
typedef struct cJSON_Hooks
|
|
||||||
{
|
|
||||||
/* malloc/free are CDECL on Windows regardless of the default calling convention of the compiler, so ensure the hooks allow passing those functions directly. */
|
|
||||||
void *(CJSON_CDECL *malloc_fn)(size_t sz);
|
|
||||||
void (CJSON_CDECL *free_fn)(void *ptr);
|
|
||||||
} cJSON_Hooks;
|
|
||||||
|
|
||||||
typedef int cJSON_bool;
|
|
||||||
|
|
||||||
/* Limits how deeply nested arrays/objects can be before cJSON rejects to parse them.
|
|
||||||
* This is to prevent stack overflows. */
|
|
||||||
#ifndef CJSON_NESTING_LIMIT
|
|
||||||
#define CJSON_NESTING_LIMIT 1000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* returns the version of cJSON as a string */
|
|
||||||
CJSON_PUBLIC(const char*) cJSON_Version(void);
|
|
||||||
|
|
||||||
/* Supply malloc, realloc and free functions to cJSON */
|
|
||||||
CJSON_PUBLIC(void) cJSON_InitHooks(cJSON_Hooks* hooks);
|
|
||||||
|
|
||||||
/* Memory Management: the caller is always responsible to free the results from all variants of cJSON_Parse (with cJSON_Delete) and cJSON_Print (with stdlib free, cJSON_Hooks.free_fn, or cJSON_free as appropriate). The exception is cJSON_PrintPreallocated, where the caller has full responsibility of the buffer. */
|
|
||||||
/* Supply a block of JSON, and this returns a cJSON object you can interrogate. */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_Parse(const char *value);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_ParseWithLength(const char *value, size_t buffer_length);
|
|
||||||
/* ParseWithOpts allows you to require (and check) that the JSON is null terminated, and to retrieve the pointer to the final byte parsed. */
|
|
||||||
/* If you supply a ptr in return_parse_end and parsing fails, then return_parse_end will contain a pointer to the error so will match cJSON_GetErrorPtr(). */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_ParseWithOpts(const char *value, const char **return_parse_end, cJSON_bool require_null_terminated);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_ParseWithLengthOpts(const char *value, size_t buffer_length, const char **return_parse_end, cJSON_bool require_null_terminated);
|
|
||||||
|
|
||||||
/* Render a cJSON entity to text for transfer/storage. */
|
|
||||||
CJSON_PUBLIC(char *) cJSON_Print(const cJSON *item);
|
|
||||||
/* Render a cJSON entity to text for transfer/storage without any formatting. */
|
|
||||||
CJSON_PUBLIC(char *) cJSON_PrintUnformatted(const cJSON *item);
|
|
||||||
/* Render a cJSON entity to text using a buffered strategy. prebuffer is a guess at the final size. guessing well reduces reallocation. fmt=0 gives unformatted, =1 gives formatted */
|
|
||||||
CJSON_PUBLIC(char *) cJSON_PrintBuffered(const cJSON *item, int prebuffer, cJSON_bool fmt);
|
|
||||||
/* Render a cJSON entity to text using a buffer already allocated in memory with given length. Returns 1 on success and 0 on failure. */
|
|
||||||
/* NOTE: cJSON is not always 100% accurate in estimating how much memory it will use, so to be safe allocate 5 bytes more than you actually need */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_PrintPreallocated(cJSON *item, char *buffer, const int length, const cJSON_bool format);
|
|
||||||
/* Delete a cJSON entity and all subentities. */
|
|
||||||
CJSON_PUBLIC(void) cJSON_Delete(cJSON *item);
|
|
||||||
|
|
||||||
/* Returns the number of items in an array (or object). */
|
|
||||||
CJSON_PUBLIC(int) cJSON_GetArraySize(const cJSON *array);
|
|
||||||
/* Retrieve item number "index" from array "array". Returns NULL if unsuccessful. */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_GetArrayItem(const cJSON *array, int index);
|
|
||||||
/* Get item "string" from object. Case insensitive. */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItem(const cJSON * const object, const char * const string);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_GetObjectItemCaseSensitive(const cJSON * const object, const char * const string);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_HasObjectItem(const cJSON *object, const char *string);
|
|
||||||
/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when cJSON_Parse() returns 0. 0 when cJSON_Parse() succeeds. */
|
|
||||||
CJSON_PUBLIC(const char *) cJSON_GetErrorPtr(void);
|
|
||||||
|
|
||||||
/* Check item type and return its value */
|
|
||||||
CJSON_PUBLIC(char *) cJSON_GetStringValue(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(double) cJSON_GetNumberValue(const cJSON * const item);
|
|
||||||
|
|
||||||
/* These functions check the type of an item */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsInvalid(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsFalse(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsTrue(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsBool(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsNull(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsNumber(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsString(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsArray(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsObject(const cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_IsRaw(const cJSON * const item);
|
|
||||||
|
|
||||||
/* These calls create a cJSON item of the appropriate type. */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateNull(void);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateTrue(void);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateFalse(void);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateBool(cJSON_bool boolean);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateNumber(double num);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateString(const char *string);
|
|
||||||
/* raw json */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateArray(void);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateObject(void);
|
|
||||||
|
|
||||||
/* Create a string where valuestring references a string so
|
|
||||||
* it will not be freed by cJSON_Delete */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateStringReference(const char *string);
|
|
||||||
/* Create an object/array that only references it's elements so
|
|
||||||
* they will not be freed by cJSON_Delete */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateObjectReference(const cJSON *child);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateArrayReference(const cJSON *child);
|
|
||||||
|
|
||||||
/* These utilities create an Array of count items.
|
|
||||||
* The parameter count cannot be greater than the number of elements in the number array, otherwise array access will be out of bounds.*/
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateIntArray(const int *numbers, int count);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateFloatArray(const float *numbers, int count);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateDoubleArray(const double *numbers, int count);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_CreateStringArray(const char *const *strings, int count);
|
|
||||||
|
|
||||||
/* Append item to the specified array/object. */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToArray(cJSON *array, cJSON *item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObject(cJSON *object, const char *string, cJSON *item);
|
|
||||||
/* Use this when string is definitely const (i.e. a literal, or as good as), and will definitely survive the cJSON object.
|
|
||||||
* WARNING: When this function was used, make sure to always check that (item->type & cJSON_StringIsConst) is zero before
|
|
||||||
* writing to `item->string` */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemToObjectCS(cJSON *object, const char *string, cJSON *item);
|
|
||||||
/* Append reference to item to the specified array/object. Use this when you want to add an existing cJSON to a new cJSON, but don't want to corrupt your existing cJSON. */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToArray(cJSON *array, cJSON *item);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_AddItemReferenceToObject(cJSON *object, const char *string, cJSON *item);
|
|
||||||
|
|
||||||
/* Remove/Detach items from Arrays/Objects. */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_DetachItemViaPointer(cJSON *parent, cJSON * const item);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromArray(cJSON *array, int which);
|
|
||||||
CJSON_PUBLIC(void) cJSON_DeleteItemFromArray(cJSON *array, int which);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObject(cJSON *object, const char *string);
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_DetachItemFromObjectCaseSensitive(cJSON *object, const char *string);
|
|
||||||
CJSON_PUBLIC(void) cJSON_DeleteItemFromObject(cJSON *object, const char *string);
|
|
||||||
CJSON_PUBLIC(void) cJSON_DeleteItemFromObjectCaseSensitive(cJSON *object, const char *string);
|
|
||||||
|
|
||||||
/* Update array items. */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_InsertItemInArray(cJSON *array, int which, cJSON *newitem); /* Shifts pre-existing items to the right. */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemViaPointer(cJSON * const parent, cJSON * const item, cJSON * replacement);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObject(cJSON *object,const char *string,cJSON *newitem);
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInObjectCaseSensitive(cJSON *object,const char *string,cJSON *newitem);
|
|
||||||
|
|
||||||
/* Duplicate a cJSON item */
|
|
||||||
CJSON_PUBLIC(cJSON *) cJSON_Duplicate(const cJSON *item, cJSON_bool recurse);
|
|
||||||
/* Duplicate will create a new, identical cJSON item to the one you pass, in new memory that will
|
|
||||||
* need to be released. With recurse!=0, it will duplicate any children connected to the item.
|
|
||||||
* The item->next and ->prev pointers are always zero on return from Duplicate. */
|
|
||||||
/* Recursively compare two cJSON items for equality. If either a or b is NULL or invalid, they will be considered unequal.
|
|
||||||
* case_sensitive determines if object keys are treated case sensitive (1) or case insensitive (0) */
|
|
||||||
CJSON_PUBLIC(cJSON_bool) cJSON_Compare(const cJSON * const a, const cJSON * const b, const cJSON_bool case_sensitive);
|
|
||||||
|
|
||||||
/* Minify a strings, remove blank characters(such as ' ', '\t', '\r', '\n') from strings.
|
|
||||||
* The input pointer json cannot point to a read-only address area, such as a string constant,
|
|
||||||
* but should point to a readable and writable address area. */
|
|
||||||
CJSON_PUBLIC(void) cJSON_Minify(char *json);
|
|
||||||
|
|
||||||
/* Helper functions for creating and adding items to an object at the same time.
|
|
||||||
* They return the added item or NULL on failure. */
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddNullToObject(cJSON * const object, const char * const name);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddTrueToObject(cJSON * const object, const char * const name);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddFalseToObject(cJSON * const object, const char * const name);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddBoolToObject(cJSON * const object, const char * const name, const cJSON_bool boolean);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddNumberToObject(cJSON * const object, const char * const name, const double number);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddStringToObject(cJSON * const object, const char * const name, const char * const string);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddRawToObject(cJSON * const object, const char * const name, const char * const raw);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name);
|
|
||||||
CJSON_PUBLIC(cJSON*) cJSON_AddArrayToObject(cJSON * const object, const char * const name);
|
|
||||||
|
|
||||||
/* When assigning an integer value, it needs to be propagated to valuedouble too. */
|
|
||||||
#define cJSON_SetIntValue(object, number) ((object) ? (object)->valueint = (object)->valuedouble = (number) : (number))
|
|
||||||
/* helper for the cJSON_SetNumberValue macro */
|
|
||||||
CJSON_PUBLIC(double) cJSON_SetNumberHelper(cJSON *object, double number);
|
|
||||||
#define cJSON_SetNumberValue(object, number) ((object != NULL) ? cJSON_SetNumberHelper(object, (double)number) : (number))
|
|
||||||
/* Change the valuestring of a cJSON_String object, only takes effect when type of object is cJSON_String */
|
|
||||||
CJSON_PUBLIC(char*) cJSON_SetValuestring(cJSON *object, const char *valuestring);
|
|
||||||
|
|
||||||
/* If the object is not a boolean type this does nothing and returns cJSON_Invalid else it returns the new type*/
|
|
||||||
#define cJSON_SetBoolValue(object, boolValue) ( \
|
|
||||||
(object != NULL && ((object)->type & (cJSON_False|cJSON_True))) ? \
|
|
||||||
(object)->type=((object)->type &(~(cJSON_False|cJSON_True)))|((boolValue)?cJSON_True:cJSON_False) : \
|
|
||||||
cJSON_Invalid\
|
|
||||||
)
|
|
||||||
|
|
||||||
/* Macro for iterating over an array or object */
|
|
||||||
#define cJSON_ArrayForEach(element, array) for(element = (array != NULL) ? (array)->child : NULL; element != NULL; element = element->next)
|
|
||||||
|
|
||||||
/* malloc/free objects using the malloc/free functions that have been set with cJSON_InitHooks */
|
|
||||||
CJSON_PUBLIC(void *) cJSON_malloc(size_t size);
|
|
||||||
CJSON_PUBLIC(void) cJSON_free(void *object);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
24765
app/src/main/cpp/json.hpp
Normal file
24765
app/src/main/cpp/json.hpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,9 @@
|
|||||||
#include <android/log.h>
|
#include <android/log.h>
|
||||||
#include <sys/system_properties.h>
|
#include <sys/system_properties.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <dirent.h>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include "zygisk.hpp"
|
#include "zygisk.hpp"
|
||||||
#include "shadowhook.h"
|
#include "shadowhook.h"
|
||||||
#include "cJSON.h"
|
#include "json.hpp"
|
||||||
|
|
||||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "PIF", __VA_ARGS__)
|
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "PIF", __VA_ARGS__)
|
||||||
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "PIF", __VA_ARGS__)
|
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "PIF", __VA_ARGS__)
|
||||||
@ -19,42 +16,34 @@
|
|||||||
|
|
||||||
#define TS_PATH "/data/adb/modules/tricky_store"
|
#define TS_PATH "/data/adb/modules/tricky_store"
|
||||||
|
|
||||||
static size_t xread(int fd, uint8_t *data, size_t size) {
|
static ssize_t xread(int fd, void *buffer, size_t count) {
|
||||||
size_t remaining = size;
|
ssize_t total = 0;
|
||||||
while (remaining > 0) {
|
char *buf = (char *) buffer;
|
||||||
ssize_t n = TEMP_FAILURE_RETRY(read(fd, data, remaining));
|
while (count > 0) {
|
||||||
if (n <= 0) {
|
ssize_t ret = TEMP_FAILURE_RETRY(read(fd, buf, count));
|
||||||
return size - remaining;
|
if (ret < 0) return -1;
|
||||||
}
|
buf += ret;
|
||||||
data += n;
|
total += ret;
|
||||||
remaining -= n;
|
count -= ret;
|
||||||
}
|
}
|
||||||
return size;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
static size_t xwrite(int fd, uint8_t *data, size_t size) {
|
static ssize_t xwrite(int fd, const void *buffer, size_t count) {
|
||||||
size_t remaining = size;
|
ssize_t total = 0;
|
||||||
while (remaining > 0) {
|
char *buf = (char *) buffer;
|
||||||
ssize_t n = TEMP_FAILURE_RETRY(write(fd, data, remaining));
|
while (count > 0) {
|
||||||
if (n < 0) {
|
ssize_t ret = TEMP_FAILURE_RETRY(write(fd, buf, count));
|
||||||
LOGE("write failed: %s", strerror(errno));
|
if (ret < 0) return -1;
|
||||||
return size - remaining;
|
buf += ret;
|
||||||
}
|
total += ret;
|
||||||
data += n;
|
count -= ret;
|
||||||
remaining -= n;
|
|
||||||
}
|
}
|
||||||
if (TEMP_FAILURE_RETRY(fsync(fd)) == -1) {
|
return total;
|
||||||
LOGE("fsync failed: %s", strerror(errno));
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::string DEVICE_INITIAL_SDK_INT;
|
|
||||||
static std::string SECURITY_PATCH;
|
|
||||||
static std::string BUILD_ID;
|
|
||||||
|
|
||||||
static bool DEBUG = false;
|
static bool DEBUG = false;
|
||||||
|
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);
|
||||||
|
|
||||||
@ -67,26 +56,24 @@ static void modify_callback(void *cookie, const char *name, const char *value, u
|
|||||||
|
|
||||||
std::string_view prop(name);
|
std::string_view prop(name);
|
||||||
|
|
||||||
bool print = false;
|
if (prop.ends_with("api_level")) {
|
||||||
|
if (!DEVICE_INITIAL_SDK_INT.empty()) {
|
||||||
if (prop == "init.svc.adbd") {
|
value = DEVICE_INITIAL_SDK_INT.c_str();
|
||||||
value = "stopped";
|
}
|
||||||
print = true;
|
} else if (prop.ends_with(".security_patch")) {
|
||||||
} else if (prop == "sys.usb.state") {
|
if (!SECURITY_PATCH.empty()) {
|
||||||
value = "mtp";
|
value = SECURITY_PATCH.c_str();
|
||||||
print = true;
|
}
|
||||||
} else if (prop.ends_with("api_level") && !DEVICE_INITIAL_SDK_INT.empty()) {
|
} else if (prop.ends_with(".build.id")) {
|
||||||
value = DEVICE_INITIAL_SDK_INT.c_str();
|
if (!BUILD_ID.empty()) {
|
||||||
print = true;
|
value = BUILD_ID.c_str();
|
||||||
} else if (prop.ends_with(".security_patch") && !SECURITY_PATCH.empty()) {
|
}
|
||||||
value = SECURITY_PATCH.c_str();
|
} else {
|
||||||
print = true;
|
if (DEBUG) LOGD("[%s]: '%s'", name, value);
|
||||||
} else if (prop.ends_with(".build.id") && !BUILD_ID.empty()) {
|
return o_callback(cookie, name, value, serial);
|
||||||
value = BUILD_ID.c_str();
|
|
||||||
print = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (print || DEBUG) LOGD("[%s]: %s", name, value);
|
LOGD("[%s]: '%s'", name, value);
|
||||||
|
|
||||||
return o_callback(cookie, name, value, serial);
|
return o_callback(cookie, name, value, serial);
|
||||||
}
|
}
|
||||||
@ -101,24 +88,19 @@ my_system_property_read_callback(const prop_info *pi, T_Callback callback, void
|
|||||||
|
|
||||||
static bool doHook() {
|
static bool doHook() {
|
||||||
shadowhook_init(SHADOWHOOK_MODE_UNIQUE, false);
|
shadowhook_init(SHADOWHOOK_MODE_UNIQUE, false);
|
||||||
{
|
|
||||||
auto libc_handle = shadowhook_dlopen("libc.so");
|
void *ptr = shadowhook_hook_sym_name(
|
||||||
if (!libc_handle) {
|
"libc.so",
|
||||||
LOGE("error loading libc.so library!");
|
"__system_property_read_callback",
|
||||||
goto exit;
|
(void *) my_system_property_read_callback,
|
||||||
}
|
(void **) &o_system_property_read_callback
|
||||||
auto handle = shadowhook_dlsym(libc_handle, "__system_property_read_callback");
|
);
|
||||||
if (!handle) {
|
|
||||||
LOGE("error resolving __system_property_read_callback symbol!");
|
if (ptr) {
|
||||||
goto exit;
|
LOGD("hook __system_property_read_callback successful at %p", ptr);
|
||||||
}
|
return true;
|
||||||
if (shadowhook_hook_sym_addr(handle, (void *) my_system_property_read_callback,
|
|
||||||
(void **) &o_system_property_read_callback)) {
|
|
||||||
LOGD("hook __system_property_read_callback success at %p", handle);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
exit:
|
|
||||||
LOGE("hook __system_property_read_callback failed!");
|
LOGE("hook __system_property_read_callback failed!");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -174,10 +156,10 @@ public:
|
|||||||
int fd = api->connectCompanion();
|
int fd = api->connectCompanion();
|
||||||
|
|
||||||
int dexSize = 0, jsonSize = 0;
|
int dexSize = 0, jsonSize = 0;
|
||||||
std::vector<uint8_t> jsonVector;
|
std::string jsonStr;
|
||||||
|
|
||||||
xread(fd, (uint8_t *) &dexSize, sizeof(int));
|
xread(fd, &dexSize, sizeof(dexSize));
|
||||||
xread(fd, (uint8_t *) &jsonSize, sizeof(int));
|
xread(fd, &jsonSize, sizeof(jsonSize));
|
||||||
|
|
||||||
if (dexSize > 0) {
|
if (dexSize > 0) {
|
||||||
dexVector.resize(dexSize);
|
dexVector.resize(dexSize);
|
||||||
@ -185,14 +167,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (jsonSize > 0) {
|
if (jsonSize > 0) {
|
||||||
jsonVector.resize(jsonSize);
|
jsonStr.resize(jsonSize);
|
||||||
xread(fd, jsonVector.data(), jsonSize * sizeof(uint8_t));
|
xread(fd, jsonStr.data(), jsonSize * sizeof(uint8_t));
|
||||||
std::string strJson(jsonVector.cbegin(), jsonVector.cend());
|
json = nlohmann::json::parse(jsonStr, nullptr, false, true);
|
||||||
json = cJSON_ParseWithLength(strJson.c_str(), strJson.size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool trickyStore = false;
|
bool trickyStore = false;
|
||||||
xread(fd, (uint8_t *) &trickyStore, sizeof(trickyStore));
|
xread(fd, &trickyStore, sizeof(trickyStore));
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
@ -202,9 +183,9 @@ public:
|
|||||||
parseJSON();
|
parseJSON();
|
||||||
|
|
||||||
if (trickyStore) {
|
if (trickyStore) {
|
||||||
LOGD("TrickyStore module installed, disabling spoofProps and spoofProvider");
|
LOGD("TrickyStore module detected!");
|
||||||
spoofProps = false;
|
|
||||||
spoofProvider = false;
|
spoofProvider = false;
|
||||||
|
spoofProps = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -213,15 +194,23 @@ public:
|
|||||||
|
|
||||||
UpdateBuildFields();
|
UpdateBuildFields();
|
||||||
|
|
||||||
if (spoofProps)
|
if (spoofProvider || spoofSignature) {
|
||||||
if (!doHook())
|
injectDex();
|
||||||
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
|
} else {
|
||||||
|
|
||||||
if (spoofProvider || spoofSignature) injectDex();
|
|
||||||
else
|
|
||||||
LOGD("Dex file won't be injected due spoofProvider and spoofSignature are false");
|
LOGD("Dex file won't be injected due spoofProvider and spoofSignature are false");
|
||||||
|
}
|
||||||
|
|
||||||
cJSON_Delete(json);
|
if (spoofProps) {
|
||||||
|
if (!doHook()) {
|
||||||
|
LOGD("dlclose zygisk lib");
|
||||||
|
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
LOGD("dlclose zygisk lib");
|
||||||
|
api->setOption(zygisk::DLCLOSE_MODULE_LIBRARY);
|
||||||
|
}
|
||||||
|
|
||||||
|
json.clear();
|
||||||
dexVector.clear();
|
dexVector.clear();
|
||||||
dexVector.shrink_to_fit();
|
dexVector.shrink_to_fit();
|
||||||
}
|
}
|
||||||
@ -234,57 +223,47 @@ private:
|
|||||||
zygisk::Api *api = nullptr;
|
zygisk::Api *api = nullptr;
|
||||||
JNIEnv *env = nullptr;
|
JNIEnv *env = nullptr;
|
||||||
std::vector<uint8_t> dexVector;
|
std::vector<uint8_t> dexVector;
|
||||||
cJSON *json = nullptr;
|
nlohmann::json json;
|
||||||
bool spoofProps = false;
|
bool spoofProps = false;
|
||||||
bool spoofProvider = false;
|
bool spoofProvider = false;
|
||||||
bool spoofSignature = false;
|
bool spoofSignature = false;
|
||||||
|
|
||||||
void parseJSON() {
|
void parseJSON() {
|
||||||
if (!json) return;
|
if (json.empty()) return;
|
||||||
|
|
||||||
const cJSON *api_level = cJSON_GetObjectItemCaseSensitive(json, "DEVICE_INITIAL_SDK_INT");
|
if (json.contains("ID") && json["ID"].is_string()) {
|
||||||
const cJSON *security_patch = cJSON_GetObjectItemCaseSensitive(json, "SECURITY_PATCH");
|
BUILD_ID = json["ID"].get<std::string>();
|
||||||
const cJSON *build_id = cJSON_GetObjectItemCaseSensitive(json, "ID");
|
}
|
||||||
const cJSON *isDebug = cJSON_GetObjectItemCaseSensitive(json, "DEBUG");
|
|
||||||
const cJSON *spoof_props = cJSON_GetObjectItemCaseSensitive(json, "spoofProps");
|
|
||||||
const cJSON *spoof_provider = cJSON_GetObjectItemCaseSensitive(json, "spoofProvider");
|
|
||||||
const cJSON *spoof_signature = cJSON_GetObjectItemCaseSensitive(json, "spoofSignature");
|
|
||||||
|
|
||||||
if (api_level) {
|
if (json.contains("SECURITY_PATCH") && json["SECURITY_PATCH"].is_string()) {
|
||||||
if (cJSON_IsNumber(api_level)) {
|
SECURITY_PATCH = json["SECURITY_PATCH"].get<std::string>();
|
||||||
DEVICE_INITIAL_SDK_INT = std::to_string(api_level->valueint);
|
}
|
||||||
} else if (cJSON_IsString(api_level)) {
|
|
||||||
DEVICE_INITIAL_SDK_INT = api_level->valuestring;
|
if (json.contains("DEVICE_INITIAL_SDK_INT")) {
|
||||||
|
if (json["DEVICE_INITIAL_SDK_INT"].is_string()) {
|
||||||
|
DEVICE_INITIAL_SDK_INT = json["DEVICE_INITIAL_SDK_INT"].get<std::string>();
|
||||||
|
} else if (json["DEVICE_INITIAL_SDK_INT"].is_number_integer()) {
|
||||||
|
DEVICE_INITIAL_SDK_INT = std::to_string(json["DEVICE_INITIAL_SDK_INT"].get<int>());
|
||||||
|
} else {
|
||||||
|
LOGE("Couldn't parse DEVICE_INITIAL_SDK_INT value!");
|
||||||
}
|
}
|
||||||
cJSON_DeleteItemFromObjectCaseSensitive(json, "DEVICE_INITIAL_SDK_INT");
|
json.erase("DEVICE_INITIAL_SDK_INT");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (security_patch && cJSON_IsString(security_patch)) {
|
if (json.contains("spoofProvider") && json["spoofProvider"].is_boolean()) {
|
||||||
SECURITY_PATCH = security_patch->valuestring;
|
spoofProvider = json["spoofProvider"].get<bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (build_id && cJSON_IsString(build_id)) {
|
if (json.contains("spoofProps") && json["spoofProps"].is_boolean()) {
|
||||||
BUILD_ID = build_id->valuestring;
|
spoofProps = json["spoofProps"].get<bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isDebug && cJSON_IsBool(isDebug)) {
|
if (json.contains("spoofSignature") && json["spoofSignature"].is_boolean()) {
|
||||||
DEBUG = cJSON_IsTrue(isDebug);
|
spoofSignature = json["spoofSignature"].get<bool>();
|
||||||
cJSON_DeleteItemFromObjectCaseSensitive(json, "DEBUG");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spoof_props && cJSON_IsBool(spoof_props)) {
|
if (json.contains("DEBUG") && json["DEBUG"].is_boolean()) {
|
||||||
spoofProps = cJSON_IsTrue(spoof_props);
|
DEBUG = json["DEBUG"].get<bool>();
|
||||||
cJSON_DeleteItemFromObjectCaseSensitive(json, "spoofProps");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spoof_provider && cJSON_IsBool(spoof_provider)) {
|
|
||||||
spoofProvider = cJSON_IsTrue(spoof_provider);
|
|
||||||
cJSON_DeleteItemFromObjectCaseSensitive(json, "spoofProvider");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spoof_signature && cJSON_IsBool(spoof_signature)) {
|
|
||||||
spoofSignature = cJSON_IsTrue(spoof_signature);
|
|
||||||
cJSON_DeleteItemFromObjectCaseSensitive(json, "spoofSignature");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +292,7 @@ private:
|
|||||||
|
|
||||||
LOGD("call init");
|
LOGD("call init");
|
||||||
auto entryInit = env->GetStaticMethodID(entryPointClass, "init", "(Ljava/lang/String;ZZ)V");
|
auto entryInit = env->GetStaticMethodID(entryPointClass, "init", "(Ljava/lang/String;ZZ)V");
|
||||||
auto jsonStr = env->NewStringUTF(cJSON_Print(json));
|
auto jsonStr = env->NewStringUTF(json.dump().c_str());
|
||||||
env->CallStaticVoidMethod(entryPointClass, entryInit, jsonStr, spoofProvider,
|
env->CallStaticVoidMethod(entryPointClass, entryInit, jsonStr, spoofProvider,
|
||||||
spoofSignature);
|
spoofSignature);
|
||||||
}
|
}
|
||||||
@ -322,36 +301,36 @@ private:
|
|||||||
jclass buildClass = env->FindClass("android/os/Build");
|
jclass buildClass = env->FindClass("android/os/Build");
|
||||||
jclass versionClass = env->FindClass("android/os/Build$VERSION");
|
jclass versionClass = env->FindClass("android/os/Build$VERSION");
|
||||||
|
|
||||||
cJSON *currentElement;
|
for (auto &[key, val]: json.items()) {
|
||||||
cJSON_ArrayForEach(currentElement, json) {
|
if (!val.is_string()) continue;
|
||||||
const char *key = currentElement->string;
|
|
||||||
|
|
||||||
if (cJSON_IsString(currentElement)) {
|
const char *fieldName = key.c_str();
|
||||||
const char *value = currentElement->valuestring;
|
|
||||||
jfieldID fieldID = env->GetStaticFieldID(buildClass, key, "Ljava/lang/String;");
|
jfieldID fieldID = env->GetStaticFieldID(buildClass, fieldName, "Ljava/lang/String;");
|
||||||
|
|
||||||
|
if (env->ExceptionCheck()) {
|
||||||
|
env->ExceptionClear();
|
||||||
|
|
||||||
|
fieldID = env->GetStaticFieldID(versionClass, fieldName, "Ljava/lang/String;");
|
||||||
|
|
||||||
if (env->ExceptionCheck()) {
|
if (env->ExceptionCheck()) {
|
||||||
env->ExceptionClear();
|
env->ExceptionClear();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fieldID = env->GetStaticFieldID(versionClass, key, "Ljava/lang/String;");
|
if (fieldID != nullptr) {
|
||||||
|
std::string str = val.get<std::string>();
|
||||||
|
const char *value = str.c_str();
|
||||||
|
jstring jValue = env->NewStringUTF(value);
|
||||||
|
|
||||||
if (env->ExceptionCheck()) {
|
env->SetStaticObjectField(buildClass, fieldID, jValue);
|
||||||
env->ExceptionClear();
|
if (env->ExceptionCheck()) {
|
||||||
continue;
|
env->ExceptionClear();
|
||||||
}
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fieldID != nullptr) {
|
LOGD("Set '%s' to '%s'", fieldName, value);
|
||||||
jstring jValue = env->NewStringUTF(value);
|
|
||||||
|
|
||||||
env->SetStaticObjectField(buildClass, fieldID, jValue);
|
|
||||||
if (env->ExceptionCheck()) {
|
|
||||||
env->ExceptionClear();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
LOGD("Set '%s' to '%s'", key, value);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -362,9 +341,7 @@ static std::vector<uint8_t> readFile(const char *path) {
|
|||||||
|
|
||||||
if (!file) return {};
|
if (!file) return {};
|
||||||
|
|
||||||
fseek(file, 0, SEEK_END);
|
int size = static_cast<int>(std::filesystem::file_size(path));
|
||||||
auto size = ftell(file);
|
|
||||||
fseek(file, 0, SEEK_SET);
|
|
||||||
|
|
||||||
std::vector<uint8_t> vector(size);
|
std::vector<uint8_t> vector(size);
|
||||||
|
|
||||||
@ -387,8 +364,8 @@ static void companion(int fd) {
|
|||||||
int dexSize = static_cast<int>(dex.size());
|
int dexSize = static_cast<int>(dex.size());
|
||||||
int jsonSize = static_cast<int>(json.size());
|
int jsonSize = static_cast<int>(json.size());
|
||||||
|
|
||||||
xwrite(fd, (uint8_t *) &dexSize, sizeof(int));
|
xwrite(fd, &dexSize, sizeof(dexSize));
|
||||||
xwrite(fd, (uint8_t *) &jsonSize, sizeof(int));
|
xwrite(fd, &jsonSize, sizeof(jsonSize));
|
||||||
|
|
||||||
if (dexSize > 0) {
|
if (dexSize > 0) {
|
||||||
xwrite(fd, dex.data(), dexSize * sizeof(uint8_t));
|
xwrite(fd, dex.data(), dexSize * sizeof(uint8_t));
|
||||||
@ -398,16 +375,8 @@ static void companion(int fd) {
|
|||||||
xwrite(fd, json.data(), jsonSize * sizeof(uint8_t));
|
xwrite(fd, json.data(), jsonSize * sizeof(uint8_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool trickyStore = false;
|
bool trickyStore = std::filesystem::exists(TS_PATH);
|
||||||
|
xwrite(fd, &trickyStore, sizeof(trickyStore));
|
||||||
DIR *dir = opendir(TS_PATH);
|
|
||||||
|
|
||||||
if (dir) {
|
|
||||||
trickyStore = true;
|
|
||||||
closedir(dir);
|
|
||||||
}
|
|
||||||
|
|
||||||
xwrite(fd, (uint8_t *) &trickyStore, sizeof(trickyStore));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
REGISTER_ZYGISK_MODULE(PlayIntegrityFix)
|
REGISTER_ZYGISK_MODULE(PlayIntegrityFix)
|
||||||
|
@ -15,8 +15,7 @@ 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.4
|
# v17.5
|
||||||
|
|
||||||
- Update fingerprint
|
- Update fingerprint
|
||||||
- Use Shadowhook instead Dobby
|
- Refactor code
|
||||||
- Improvements in code
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
id=playintegrityfix
|
id=playintegrityfix
|
||||||
name=Play Integrity Fix
|
name=Play Integrity Fix
|
||||||
version=v17.4
|
version=v17.5
|
||||||
versionCode=17400
|
versionCode=17500
|
||||||
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,18 +1,19 @@
|
|||||||
{
|
{
|
||||||
"ID": "AP41.240726.010",
|
|
||||||
"BRAND": "google",
|
|
||||||
"DEVICE": "komodo",
|
|
||||||
"TYPE": "user",
|
"TYPE": "user",
|
||||||
"TAGS": "release-keys",
|
"TAGS": "release-keys",
|
||||||
"FINGERPRINT": "google/komodo_beta/komodo:15/AP41.240726.010/12266677:user/release-keys",
|
"ID": "AP31.240617.015",
|
||||||
|
"BRAND": "google",
|
||||||
|
"DEVICE": "komodo",
|
||||||
|
"FINGERPRINT": "google/komodo_beta/komodo:15/AP31.240617.015/12207491:user/release-keys",
|
||||||
"MANUFACTURER": "Google",
|
"MANUFACTURER": "Google",
|
||||||
"MODEL": "Pixel 9 Pro XL",
|
"MODEL": "Pixel 9 Pro XL",
|
||||||
"PRODUCT": "komodo_beta",
|
"PRODUCT": "komodo_beta",
|
||||||
"INCREMENTAL": "12266677",
|
"INCREMENTAL": "12207491",
|
||||||
"RELEASE": "15",
|
"RELEASE": "15",
|
||||||
"SECURITY_PATCH": "2024-08-05",
|
"SECURITY_PATCH": "2024-08-05",
|
||||||
"DEVICE_INITIAL_SDK_INT": 32,
|
"DEVICE_INITIAL_SDK_INT": 26,
|
||||||
"spoofProvider": true,
|
"spoofProvider": true,
|
||||||
"spoofProps": false,
|
"spoofProps": true,
|
||||||
"spoofSignature": false
|
"spoofSignature": false,
|
||||||
|
"DEBUG": false
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": "v17.4",
|
"version": "v17.5",
|
||||||
"versionCode": 17400,
|
"versionCode": 17500,
|
||||||
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.4/PlayIntegrityFix_v17.4.zip",
|
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v17.5/PlayIntegrityFix_v17.5.zip",
|
||||||
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
|
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user