This commit is contained in:
chiteroman 2024-03-06 16:30:03 +01:00
parent e2a292ac9f
commit 8e239aade9
9 changed files with 208 additions and 224 deletions

View File

@ -12,14 +12,10 @@ android {
applicationId = "es.chiteroman.playintegrityfix" applicationId = "es.chiteroman.playintegrityfix"
minSdk = 26 minSdk = 26
targetSdk = 34 targetSdk = 34
versionCode = 15930 versionCode = 15940
versionName = "v15.9.3" versionName = "v15.9.4"
multiDexEnabled = false multiDexEnabled = false
buildFeatures {
prefab = true
}
packaging { packaging {
jniLibs { jniLibs {
excludes += "**/liblog.so" excludes += "**/liblog.so"
@ -29,18 +25,16 @@ android {
externalNativeBuild { externalNativeBuild {
cmake { cmake {
arguments += "-DANDROID_STL=none" arguments += "-DANDROID_STL=c++_static"
arguments += "-DCMAKE_BUILD_TYPE=MinSizeRel" arguments += "-DCMAKE_BUILD_TYPE=Release"
arguments += "-DPlugin.Android.BionicLinkerUtil=ON"
cFlags += "-std=c2x" cppFlags += "-std=c++20"
cFlags += "-fvisibility=hidden"
cFlags += "-fvisibility-inlines-hidden"
cppFlags += "-std=c++2b"
cppFlags += "-fno-exceptions" cppFlags += "-fno-exceptions"
cppFlags += "-fno-rtti" cppFlags += "-fno-rtti"
cppFlags += "-fvisibility=hidden" cppFlags += "-fvisibility=hidden"
cppFlags += "-fvisibility-inlines-hidden" cppFlags += "-fvisibility-inlines-hidden"
cppFlags += "-flto"
} }
} }
} }
@ -67,10 +61,6 @@ android {
} }
} }
dependencies {
implementation("dev.rikka.ndk.thirdparty:cxx:1.2.0")
}
tasks.register("updateModuleProp") { tasks.register("updateModuleProp") {
doLast { doLast {
val versionName = project.android.defaultConfig.versionName val versionName = project.android.defaultConfig.versionName

View File

@ -4,10 +4,6 @@ project(playintegrityfix)
add_library(${CMAKE_PROJECT_NAME} SHARED main.cpp) add_library(${CMAKE_PROJECT_NAME} SHARED main.cpp)
find_package(cxx REQUIRED CONFIG)
link_libraries(cxx::cxx)
add_subdirectory(Dobby) add_subdirectory(Dobby)
target_link_libraries(${CMAKE_PROJECT_NAME} log dobby_static) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log dobby_static)

View File

@ -26,7 +26,7 @@ option(Plugin.SymbolResolver "Enable symbol resolver" ON)
option(Plugin.ImportTableReplace "Enable import table replace " OFF) option(Plugin.ImportTableReplace "Enable import table replace " OFF)
option(Plugin.Android.BionicLinkerUtil "Enable android bionic linker util" OFF) option(Plugin.Android.BionicLinkerUtil "Enable android bionic linker util" ON)
option(DOBBY_BUILD_EXAMPLE "Build example" OFF) option(DOBBY_BUILD_EXAMPLE "Build example" OFF)
@ -38,7 +38,7 @@ option(DOBBY_BUILD_KERNEL_MODE "Build xnu kernel mode" OFF)
option(Private.Obfuscation "Enable llvm obfuscation" OFF) option(Private.Obfuscation "Enable llvm obfuscation" OFF)
if ((NOT DEFINED CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "Debug")) if ((NOT DEFINED CMAKE_BUILD_TYPE) OR (CMAKE_BUILD_TYPE STREQUAL "Debug"))
set(DOBBY_DEBUG ON) set(DOBBY_DEBUG ON)
endif () endif ()
@ -46,17 +46,17 @@ set(compile_definitions "")
# for arm64, allow access q8 - q31 # for arm64, allow access q8 - q31
if (FullFloatingPointRegisterPack) if (FullFloatingPointRegisterPack)
set(compile_definitions "${compile_definitions} -DFULL_FLOATING_POINT_REGISTER_PACK") set(compile_definitions "${compile_definitions} -DFULL_FLOATING_POINT_REGISTER_PACK")
endif () endif ()
if (DOBBY_BUILD_KERNEL_MODE) if (DOBBY_BUILD_KERNEL_MODE)
set(compile_definitions "${compile_definitions} -DBUILDING_KERNEL") set(compile_definitions "${compile_definitions} -DBUILDING_KERNEL")
endif () endif ()
if (DOBBY_DEBUG) if (DOBBY_DEBUG)
set(compile_definitions "${compile_definitions} -DDOBBY_DEBUG") set(compile_definitions "${compile_definitions} -DDOBBY_DEBUG")
else () else ()
set(compile_definitions "${compile_definitions} -DDOBBY_LOGGING_DISABLE") set(compile_definitions "${compile_definitions} -DDOBBY_LOGGING_DISABLE")
endif () endif ()
if (CMAKE_GENERATOR STREQUAL Xcode) if (CMAKE_GENERATOR STREQUAL Xcode)
@ -79,166 +79,166 @@ message(STATUS "[Dobby] Private.Obfuscation: ${Private.Obfuscation}")
# --- # ---
include_directories( include_directories(
. .
./include ./include
./source ./source
source/dobby source/dobby
./external ./external
./external/logging ./external/logging
./builtin-plugin ./builtin-plugin
) )
if (SYSTEM.Darwin AND (NOT DOBBY_BUILD_KERNEL_MODE)) if (SYSTEM.Darwin AND (NOT DOBBY_BUILD_KERNEL_MODE))
include_directories( include_directories(
source/Backend/UserMode source/Backend/UserMode
) )
endif () endif ()
# --- # ---
set(DOBBY_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(DOBBY_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
# cpu # cpu
source/core/arch/CpuFeature.cc source/core/arch/CpuFeature.cc
source/core/arch/CpuRegister.cc source/core/arch/CpuRegister.cc
# assembler # assembler
source/core/assembler/assembler.cc source/core/assembler/assembler.cc
source/core/assembler/assembler-arm.cc source/core/assembler/assembler-arm.cc
source/core/assembler/assembler-arm64.cc source/core/assembler/assembler-arm64.cc
source/core/assembler/assembler-ia32.cc source/core/assembler/assembler-ia32.cc
source/core/assembler/assembler-x64.cc source/core/assembler/assembler-x64.cc
# codegen # codegen
source/core/codegen/codegen-arm.cc source/core/codegen/codegen-arm.cc
source/core/codegen/codegen-arm64.cc source/core/codegen/codegen-arm64.cc
source/core/codegen/codegen-ia32.cc source/core/codegen/codegen-ia32.cc
source/core/codegen/codegen-x64.cc source/core/codegen/codegen-x64.cc
# memory kit # memory kit
source/MemoryAllocator/CodeBuffer/CodeBufferBase.cc source/MemoryAllocator/CodeBuffer/CodeBufferBase.cc
source/MemoryAllocator/AssemblyCodeBuilder.cc source/MemoryAllocator/AssemblyCodeBuilder.cc
source/MemoryAllocator/MemoryAllocator.cc source/MemoryAllocator/MemoryAllocator.cc
# instruction relocation # instruction relocation
source/InstructionRelocation/arm/InstructionRelocationARM.cc source/InstructionRelocation/arm/InstructionRelocationARM.cc
source/InstructionRelocation/arm64/InstructionRelocationARM64.cc source/InstructionRelocation/arm64/InstructionRelocationARM64.cc
source/InstructionRelocation/x86/InstructionRelocationX86.cc source/InstructionRelocation/x86/InstructionRelocationX86.cc
source/InstructionRelocation/x86/InstructionRelocationX86Shared.cc source/InstructionRelocation/x86/InstructionRelocationX86Shared.cc
source/InstructionRelocation/x64/InstructionRelocationX64.cc source/InstructionRelocation/x64/InstructionRelocationX64.cc
source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c source/InstructionRelocation/x86/x86_insn_decode/x86_insn_decode.c
# intercept routing # intercept routing
source/InterceptRouting/InterceptRouting.cpp source/InterceptRouting/InterceptRouting.cpp
# intercept routing trampoline # intercept routing trampoline
source/TrampolineBridge/Trampoline/arm/trampoline_arm.cc source/TrampolineBridge/Trampoline/arm/trampoline_arm.cc
source/TrampolineBridge/Trampoline/arm64/trampoline_arm64.cc source/TrampolineBridge/Trampoline/arm64/trampoline_arm64.cc
source/TrampolineBridge/Trampoline/x86/trampoline_x86.cc source/TrampolineBridge/Trampoline/x86/trampoline_x86.cc
source/TrampolineBridge/Trampoline/x64/trampoline_x64.cc source/TrampolineBridge/Trampoline/x64/trampoline_x64.cc
# closure trampoline bridge - arm # closure trampoline bridge - arm
source/TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.cc source/TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.cc
source/TrampolineBridge/ClosureTrampolineBridge/arm/helper_arm.cc source/TrampolineBridge/ClosureTrampolineBridge/arm/helper_arm.cc
source/TrampolineBridge/ClosureTrampolineBridge/arm/closure_bridge_arm.cc source/TrampolineBridge/ClosureTrampolineBridge/arm/closure_bridge_arm.cc
source/TrampolineBridge/ClosureTrampolineBridge/arm/ClosureTrampolineARM.cc source/TrampolineBridge/ClosureTrampolineBridge/arm/ClosureTrampolineARM.cc
# closure trampoline bridge - arm64 # closure trampoline bridge - arm64
source/TrampolineBridge/ClosureTrampolineBridge/arm64/helper_arm64.cc source/TrampolineBridge/ClosureTrampolineBridge/arm64/helper_arm64.cc
source/TrampolineBridge/ClosureTrampolineBridge/arm64/closure_bridge_arm64.cc source/TrampolineBridge/ClosureTrampolineBridge/arm64/closure_bridge_arm64.cc
source/TrampolineBridge/ClosureTrampolineBridge/arm64/ClosureTrampolineARM64.cc source/TrampolineBridge/ClosureTrampolineBridge/arm64/ClosureTrampolineARM64.cc
# closure trampoline bridge - x86 # closure trampoline bridge - x86
source/TrampolineBridge/ClosureTrampolineBridge/x86/helper_x86.cc source/TrampolineBridge/ClosureTrampolineBridge/x86/helper_x86.cc
source/TrampolineBridge/ClosureTrampolineBridge/x86/closure_bridge_x86.cc source/TrampolineBridge/ClosureTrampolineBridge/x86/closure_bridge_x86.cc
source/TrampolineBridge/ClosureTrampolineBridge/x86/ClosureTrampolineX86.cc source/TrampolineBridge/ClosureTrampolineBridge/x86/ClosureTrampolineX86.cc
# closure trampoline bridge - x64 # closure trampoline bridge - x64
source/TrampolineBridge/ClosureTrampolineBridge/x64/helper_x64.cc source/TrampolineBridge/ClosureTrampolineBridge/x64/helper_x64.cc
source/TrampolineBridge/ClosureTrampolineBridge/x64/closure_bridge_x64.cc source/TrampolineBridge/ClosureTrampolineBridge/x64/closure_bridge_x64.cc
source/TrampolineBridge/ClosureTrampolineBridge/x64/ClosureTrampolineX64.cc source/TrampolineBridge/ClosureTrampolineBridge/x64/ClosureTrampolineX64.cc
source/InterceptRouting/Routing/InstructionInstrument/InstructionInstrument.cc source/InterceptRouting/Routing/InstructionInstrument/InstructionInstrument.cc
source/InterceptRouting/Routing/InstructionInstrument/RoutingImpl.cc source/InterceptRouting/Routing/InstructionInstrument/RoutingImpl.cc
source/InterceptRouting/Routing/InstructionInstrument/instrument_routing_handler.cc source/InterceptRouting/Routing/InstructionInstrument/instrument_routing_handler.cc
source/InterceptRouting/Routing/FunctionInlineHook/FunctionInlineHook.cc source/InterceptRouting/Routing/FunctionInlineHook/FunctionInlineHook.cc
source/InterceptRouting/Routing/FunctionInlineHook/RoutingImpl.cc source/InterceptRouting/Routing/FunctionInlineHook/RoutingImpl.cc
# plugin register # plugin register
source/InterceptRouting/RoutingPlugin/RoutingPlugin.cc source/InterceptRouting/RoutingPlugin/RoutingPlugin.cc
# main # main
source/dobby.cpp source/dobby.cpp
source/Interceptor.cpp source/Interceptor.cpp
source/InterceptEntry.cpp source/InterceptEntry.cpp
) )
if (SYSTEM.Darwin AND NOT DOBBY_BUILD_KERNEL_MODE) if (SYSTEM.Darwin AND NOT DOBBY_BUILD_KERNEL_MODE)
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/Backend/UserMode/PlatformUtil/Darwin/ProcessRuntimeUtility.cc source/Backend/UserMode/PlatformUtil/Darwin/ProcessRuntimeUtility.cc
source/Backend/UserMode/UnifiedInterface/platform-posix.cc source/Backend/UserMode/UnifiedInterface/platform-posix.cc
source/Backend/UserMode/ExecMemory/code-patch-tool-darwin.cc source/Backend/UserMode/ExecMemory/code-patch-tool-darwin.cc
source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c
) )
elseif (SYSTEM.Linux OR SYSTEM.Android) elseif (SYSTEM.Linux OR SYSTEM.Android)
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/Backend/UserMode/PlatformUtil/Linux/ProcessRuntimeUtility.cc source/Backend/UserMode/PlatformUtil/Linux/ProcessRuntimeUtility.cc
source/Backend/UserMode/UnifiedInterface/platform-posix.cc source/Backend/UserMode/UnifiedInterface/platform-posix.cc
source/Backend/UserMode/ExecMemory/code-patch-tool-posix.cc source/Backend/UserMode/ExecMemory/code-patch-tool-posix.cc
source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c
) )
elseif (SYSTEM.Windows) elseif (SYSTEM.Windows)
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/Backend/UserMode/PlatformUtil/Windows/ProcessRuntimeUtility.cc source/Backend/UserMode/PlatformUtil/Windows/ProcessRuntimeUtility.cc
source/Backend/UserMode/UnifiedInterface/platform-windows.cc source/Backend/UserMode/UnifiedInterface/platform-windows.cc
source/Backend/UserMode/ExecMemory/code-patch-tool-windows.cc source/Backend/UserMode/ExecMemory/code-patch-tool-windows.cc
source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c source/Backend/UserMode/ExecMemory/clear-cache-tool-all.c
) )
endif () endif ()
if (PROCESSOR.X86_64 OR PROCESSOR.X86) if (PROCESSOR.X86_64 OR PROCESSOR.X86)
set(NearBranch ON) set(NearBranch ON)
endif () endif ()
# --- # ---
if (0 AND SYSTEM.iOS AND (NOT DOBBY_BUILD_KERNEL_MODE)) if (0 AND SYSTEM.iOS AND (NOT DOBBY_BUILD_KERNEL_MODE))
include_directories( include_directories(
source/Backend/UserMode/ExecMemory/substrated source/Backend/UserMode/ExecMemory/substrated
)
set(compile_definitions "${compile_definitions} -DCODE_PATCH_WITH_SUBSTRATED")
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/Backend/UserMode/ExecMemory/substrated/mach_interface_support
) )
set(compile_definitions "${compile_definitions} -DCODE_PATCH_WITH_SUBSTRATED")
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/Backend/UserMode/ExecMemory/substrated/mach_interface_support
)
endif () endif ()
# ----- instrument ----- # ----- instrument -----
if (FunctionWrapper) if (FunctionWrapper)
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
# user mode - multi thread support # user mode - multi thread support
# source/UserMode/MultiThreadSupport/ThreadSupport.cpp # source/UserMode/MultiThreadSupport/ThreadSupport.cpp
# source/UserMode/Thread/PlatformThread.cc # source/UserMode/Thread/PlatformThread.cc
# source/UserMode/Thread/platform-thread-${platform1}.cc # source/UserMode/Thread/platform-thread-${platform1}.cc
) )
message(FATAL_ERROR "[!] FunctionWrapper plugin is not supported") message(FATAL_ERROR "[!] FunctionWrapper plugin is not supported")
endif () endif ()
# --- # ---
if (NearBranch) if (NearBranch)
set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST} set(dobby.SOURCE_FILE_LIST ${dobby.SOURCE_FILE_LIST}
source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/near_trampoline_arm64.cc source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/near_trampoline_arm64.cc
source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/NearBranchTrampoline.cc source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/NearBranchTrampoline.cc
source/MemoryAllocator/NearMemoryAllocator.cc) source/MemoryAllocator/NearMemoryAllocator.cc)
endif () endif ()
# --- # ---
@ -253,19 +253,19 @@ add_subdirectory(external/osbase)
# --- # ---
if (Plugin.SymbolResolver) if (Plugin.SymbolResolver)
include_directories(builtin-plugin/SymbolResolver) include_directories(builtin-plugin/SymbolResolver)
add_subdirectory(builtin-plugin/SymbolResolver) add_subdirectory(builtin-plugin/SymbolResolver)
get_target_property(symbol_resolver.SOURCE_FILE_LIST dobby_symbol_resolver SOURCES) get_target_property(symbol_resolver.SOURCE_FILE_LIST dobby_symbol_resolver SOURCES)
set(dobby.plugin.SOURCE_FILE_LIST ${dobby.plugin.SOURCE_FILE_LIST} set(dobby.plugin.SOURCE_FILE_LIST ${dobby.plugin.SOURCE_FILE_LIST}
${symbol_resolver.SOURCE_FILE_LIST} ${symbol_resolver.SOURCE_FILE_LIST}
) )
endif () endif ()
# --- # ---
set(dobby.HEADER_FILE_LIST set(dobby.HEADER_FILE_LIST
include/dobby.h include/dobby.h
) )
# --- # ---
@ -273,15 +273,15 @@ set(dobby.HEADER_FILE_LIST
string(TIMESTAMP TODAY "%Y%m%d") string(TIMESTAMP TODAY "%Y%m%d")
set(VERSION_REVISION "-${TODAY}") set(VERSION_REVISION "-${TODAY}")
if (EXISTS "${CMAKE_SOURCE_DIR}/.git") if (EXISTS "${CMAKE_SOURCE_DIR}/.git")
execute_process( execute_process(
COMMAND git rev-parse --short --verify HEAD COMMAND git rev-parse --short --verify HEAD
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_COMMIT_HASH OUTPUT_VARIABLE VERSION_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
) )
if (VERSION_COMMIT_HASH) if (VERSION_COMMIT_HASH)
set(VERSION_REVISION "${VERSION_REVISION}-${VERSION_COMMIT_HASH}") set(VERSION_REVISION "${VERSION_REVISION}-${VERSION_COMMIT_HASH}")
endif () endif ()
endif () endif ()
set(DOBBY_BUILD_VERSION "Dobby${VERSION_REVISION}") set(DOBBY_BUILD_VERSION "Dobby${VERSION_REVISION}")
set(compile_definitions "${compile_definitions} -D__DOBBY_BUILD_VERSION__=\"${DOBBY_BUILD_VERSION}\"") set(compile_definitions "${compile_definitions} -D__DOBBY_BUILD_VERSION__=\"${DOBBY_BUILD_VERSION}\"")
@ -290,95 +290,95 @@ message(STATUS "[Dobby] ${DOBBY_BUILD_VERSION}")
# --- # ---
set(SOURCE_FILE_LIST set(SOURCE_FILE_LIST
${dobby.HEADER_FILE_LIST} ${dobby.HEADER_FILE_LIST}
${dobby.SOURCE_FILE_LIST} ${dobby.SOURCE_FILE_LIST}
${logging.SOURCE_FILE_LIST} ${logging.SOURCE_FILE_LIST}
${dobby.plugin.SOURCE_FILE_LIST} ${dobby.plugin.SOURCE_FILE_LIST}
) )
get_absolute_path_list(SOURCE_FILE_LIST SOURCE_FILE_LIST_) get_absolute_path_list(SOURCE_FILE_LIST SOURCE_FILE_LIST_)
set(SOURCE_FILE_LIST ${SOURCE_FILE_LIST_}) set(SOURCE_FILE_LIST ${SOURCE_FILE_LIST_})
add_library(dobby SHARED add_library(dobby SHARED
${SOURCE_FILE_LIST} ${SOURCE_FILE_LIST}
) )
target_include_directories(dobby PUBLIC target_include_directories(dobby PUBLIC
include include
) )
# --- # ---
add_library(dobby_static STATIC add_library(dobby_static STATIC
${SOURCE_FILE_LIST} ${SOURCE_FILE_LIST}
) )
target_include_directories(dobby_static PUBLIC target_include_directories(dobby_static PUBLIC
include include
) )
set_target_properties(dobby_static set_target_properties(dobby_static
PROPERTIES OUTPUT_NAME "dobby" PROPERTIES OUTPUT_NAME "dobby"
) )
# --- # ---
set_target_properties(dobby set_target_properties(dobby
PROPERTIES PROPERTIES
LINK_FLAGS "${linker_flags}" LINK_FLAGS "${linker_flags}"
COMPILE_FLAGS "${compiler_flags}" COMPILE_FLAGS "${compiler_flags}"
) )
set_target_properties(dobby_static set_target_properties(dobby_static
PROPERTIES PROPERTIES
COMPILE_FLAGS "${compiler_flags}" COMPILE_FLAGS "${compiler_flags}"
) )
target_compile_definitions(dobby PRIVATE target_compile_definitions(dobby PRIVATE
"COMPILE_DEFINITIONS ${compile_definitions}" "COMPILE_DEFINITIONS ${compile_definitions}"
) )
target_compile_definitions(dobby_static PRIVATE target_compile_definitions(dobby_static PRIVATE
"COMPILE_DEFINITIONS ${compile_definitions}" "COMPILE_DEFINITIONS ${compile_definitions}"
) )
# --- # ---
if (Private.Obfuscation) if (Private.Obfuscation)
set(linker_flags "${linker_flags} -Wl,-mllvm -Wl,-obfuscator-conf=all") set(linker_flags "${linker_flags} -Wl,-mllvm -Wl,-obfuscator-conf=all")
endif () endif ()
# --- # ---
if (SYSTEM.Android) if (SYSTEM.Android)
target_link_libraries(dobby log) target_link_libraries(dobby log)
if (PROCESSOR.ARM) if (PROCESSOR.ARM)
set_target_properties(dobby set_target_properties(dobby
PROPERTIES PROPERTIES
ANDROID_ARM_MODE arm ANDROID_ARM_MODE arm
) )
set_target_properties(dobby_static set_target_properties(dobby_static
PROPERTIES PROPERTIES
ANDROID_ARM_MODE arm ANDROID_ARM_MODE arm
) )
endif () endif ()
endif () endif ()
if (SYSTEM.Linux) if (SYSTEM.Linux)
target_link_libraries(dobby dl) target_link_libraries(dobby dl)
endif () endif ()
# --- # ---
if (DOBBY_BUILD_EXAMPLE AND (NOT DOBBY_BUILD_KERNEL_MODE)) if (DOBBY_BUILD_EXAMPLE AND (NOT DOBBY_BUILD_KERNEL_MODE))
add_subdirectory(examples) add_subdirectory(examples)
endif () endif ()
if (DOBBY_BUILD_TEST AND (NOT DOBBY_BUILD_KERNEL_MODE)) if (DOBBY_BUILD_TEST AND (NOT DOBBY_BUILD_KERNEL_MODE))
add_subdirectory(tests) add_subdirectory(tests)
endif () endif ()
# --- # ---
if (SYSTEM.Darwin AND (NOT DOBBY_BUILD_KERNEL_MODE)) if (SYSTEM.Darwin AND (NOT DOBBY_BUILD_KERNEL_MODE))
include(cmake/platform/platform-darwin.cmake) include(cmake/platform/platform-darwin.cmake)
endif () endif ()

View File

@ -27,16 +27,7 @@ public final class CustomKeyStoreSpi extends KeyStoreSpi {
@Override @Override
public Certificate[] engineGetCertificateChain(String alias) { public Certificate[] engineGetCertificateChain(String alias) {
Certificate[] certificates; Certificate[] certificates = keyStoreSpi.engineGetCertificateChain(alias);
// Check for broken TEE devices... It shouldn't happen because exception is in generateKeyPair
// Also, for custom roms which implement a bypass :D
try {
certificates = keyStoreSpi.engineGetCertificateChain(alias);
} catch (Throwable t) {
EntryPoint.LOG("engineGetCertificateChain: " + t);
throw new UnsupportedOperationException();
}
// If certificate array is null, throw exception // If certificate array is null, throw exception
// This shouldn't happen... // This shouldn't happen...

View File

@ -5,6 +5,6 @@ https://t.me/playintegrityfix
Device verdict should pass by default. Device verdict should pass by default.
If not, try removing /data/adb/pif.json file. If not, try removing /data/adb/pif.json file.
# v15.9.3 # v15.9.4
- Fix bootloop issue on few devices x2 - Misc improvements.

View File

@ -22,8 +22,10 @@ if [ -f "/data/adb/pif.json" ]; then
ui_print "- If pif.json file doesn't exist, module will use default one" ui_print "- If pif.json file doesn't exist, module will use default one"
fi fi
ui_print "- Removing conflict apps..."
# Remove conflict apps # Remove conflict apps
REMOVE=" APPS="
/system/app/EliteDevelopmentModule /system/app/EliteDevelopmentModule
/system/app/XInjectModule /system/app/XInjectModule
/system/product/app/XiaomiEUInject /system/product/app/XiaomiEUInject
@ -32,18 +34,17 @@ REMOVE="
/system/system_ext/app/PifPrebuilt /system/system_ext/app/PifPrebuilt
" "
if [ "$KSU" = "true" ] || [ "$APATCH" = "true" ] || [ "$MAGISK_VER" = *"-kitsune" ]; then for app in $APPS; do
ui_print "- KernelSU / APatch / Kitsune Magisk detected, all apps removed!" if [ -d "$app" ]; then
else directory="$MODPATH$app"
ui_print "- Other Magisk detected, conflict apps will be removed one by one"
for path in $REMOVE; do
if [ -d "$path" ]; then
directory="$MODPATH${path}"
[ -d "$directory" ] || mkdir -p "$directory" [ -d "$directory" ] || mkdir -p "$directory"
touch "$directory/.replace" if [ "$KSU" = "true" ] || [ "$APATCH" = "true" ]; then
ui_print "- ${path##*/} app removed" mknod $directory c 0 0
else
touch $directory/.replace
fi
ui_print "- ${app##*/} app removed"
else else
ui_print "- ${path##*/} app doesn't exist, skip" ui_print "- ${app##*/} app doesn't exist, skip"
fi fi
done done
fi

View File

@ -1,7 +1,7 @@
id=playintegrityfix id=playintegrityfix
name=Play Integrity Fix name=Play Integrity Fix
version=v15.9.3 version=v15.9.4
versionCode=15930 versionCode=15940
author=chiteroman author=chiteroman
description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-14. description=Universal modular fix for Play Integrity (and SafetyNet) on devices running Android 8-14.
updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json updateJson=https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/update.json

View File

@ -51,4 +51,10 @@ fi
resetprop_if_diff vendor.boot.verifiedbootstate green resetprop_if_diff vendor.boot.verifiedbootstate green
resetprop_if_diff vendor.boot.vbmeta.device_state locked resetprop_if_diff vendor.boot.vbmeta.device_state locked
resetprop_if_diff ro.crypto.state encrypted
resetprop_if_diff ro.secureboot.lockstate locked
resetprop_if_diff ro.boot.realmebootstate green
}& }&

View File

@ -1,6 +1,6 @@
{ {
"version": "v15.9.3", "version": "v15.9.4",
"versionCode": 15930, "versionCode": 15940,
"zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v15.9.3/PlayIntegrityFix_v15.9.3.zip", "zipUrl": "https://github.com/chiteroman/PlayIntegrityFix/releases/download/v15.9.4/PlayIntegrityFix_v15.9.4.zip",
"changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md" "changelog": "https://raw.githubusercontent.com/chiteroman/PlayIntegrityFix/main/changelog.md"
} }