-
-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4eeddec
commit 847b031
Showing
8 changed files
with
189 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
cmake_minimum_required(VERSION 3.5) | ||
cmake_minimum_required(VERSION 3.22.1) | ||
|
||
project("playintegrityfix") | ||
|
||
find_package(cxx REQUIRED CONFIG) | ||
add_library(zygisk SHARED main.cpp) | ||
|
||
add_library(inject SHARED inject.cpp) | ||
|
||
link_libraries(cxx::cxx) | ||
target_link_libraries(zygisk PRIVATE log stdc++) | ||
|
||
add_library(${CMAKE_PROJECT_NAME} SHARED main.cpp) | ||
find_package(cxx REQUIRED CONFIG) | ||
|
||
add_subdirectory(Dobby) | ||
|
||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE log dobby_static) | ||
target_link_libraries(dobby cxx::cxx) | ||
target_link_libraries(dobby_static cxx::cxx) | ||
|
||
target_link_libraries(inject PRIVATE log dobby_static) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include <android/log.h> | ||
#include <jni.h> | ||
#include "json.hpp" | ||
#include "dobby.h" | ||
|
||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, "PIF", __VA_ARGS__) | ||
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, "PIF", __VA_ARGS__) | ||
|
||
static std::string dir; | ||
static JNIEnv *env; | ||
|
||
extern "C" [[gnu::visibility("default"), maybe_unused]] | ||
void init(char *rawDir, JavaVM *jvm) { | ||
dir = rawDir; | ||
LOGD("[INJECT] GMS dir: %s", dir.c_str()); | ||
jvm->GetEnv(reinterpret_cast<void **>(&env), JNI_VERSION_1_6); | ||
|
||
LOGD("[INJECT] Done!"); | ||
} |
Oops, something went wrong.