Feat: Add 'app' subproject and integrate LSPlt submodule
This commit introduces the main application subproject, 'app', and sets up the necessary infrastructure for the TEESimulator. Key changes: * 'app' Subproject Setup: Added the new :app module with its initial structure, including build files, manifest, and Kotlin main entry point. * LSPlt Integration: Added the LSPlt hooking framework as a Git submodule in app/src/main/cpp/external/ and configured its use in CMake. * Native Build Configuration: Configured the C++ build to use LSPlt statically and compile two essential native libraries: libinject.so (for injection) and libTEESimulator.so (for interception/logic). * Module Packaging: Implemented complex Gradle logic within app/build.gradle.kts to automate the creation of a flashable zip module (supporting Magisk, Ksu, and Apatch) with versioning based on Git information. * Initial Module Files: Added the template files (module.prop, update-binary, updater-script) for the flashable module structure.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(TEESimulator)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions")
|
||||
|
||||
# LSPlt configuration
|
||||
OPTION(LSPLT_BUILD_SHARED OFF)
|
||||
add_subdirectory(external/LSPlt/lsplt/src/main/jni)
|
||||
|
||||
add_executable(libinject.so inject/main.cpp)
|
||||
target_link_libraries(libinject.so PRIVATE lsplt_static)
|
||||
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED binder_interceptor.cpp)
|
||||
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE lsplt_static)
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#include "lsplt.hpp"
|
||||
|
||||
extern "C" [[gnu::visibility("default")]] [[gnu::used]]
|
||||
bool entry(void *library_handle) {
|
||||
return true;
|
||||
}
|
||||
+1
Submodule app/src/main/cpp/external/LSPlt added at 3e29437f03
@@ -0,0 +1,3 @@
|
||||
#include "lsplt.hpp"
|
||||
|
||||
int main(int argc, char **argv) { return 0; }
|
||||
Reference in New Issue
Block a user