-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added hooking abstraction for multiple framework support * Converted ADBI to a hooking framework for Android < Pie * Added xHook hooking framework for Android >= Pie * Added support for mangled symbol names since Android now uses C++ in NFC-NCI * Removed Android headers in favor of version specific offsets * Removed hooks only used for debugging * Switched SetConfig from requiring original call to global flags for unguarded access * Bumped SDK version Co-authored-by: Alexandros Roussos <thealexroussos@gmail.com>
- Loading branch information
1 parent
0f03e65
commit e84644f
Showing
32 changed files
with
405 additions
and
6,414 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
[submodule "protocol"] | ||
path = protobuf/src/main/proto/protocol | ||
url = ../protocol.git | ||
[submodule "nfcd/xHook"] | ||
path = nfcd/xHook | ||
url = https://github.com/iqiyi/xHook.git |
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,15 +1,28 @@ | ||
cmake_minimum_required(VERSION 3.4.1) | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
# xHook target | ||
file(GLOB XH_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/xHook/libxhook/jni/*.c) | ||
set(XH_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/xHook/libxhook/jni/) | ||
add_library(xh STATIC ${XH_SOURCES}) | ||
target_include_directories(xh PUBLIC ${XH_INCLUDE_DIR}) | ||
|
||
# find files | ||
file(GLOB_RECURSE NFCD_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/*.h) | ||
file(GLOB_RECURSE NFCD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp) | ||
|
||
# cxx standard | ||
set(CMAKE_CXX_STANDARD 11) | ||
|
||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/src/main/jni/include/) | ||
|
||
# compile library | ||
add_library(nfcgate SHARED ${NFCD_HEADERS} ${NFCD_SOURCES}) | ||
|
||
# platform specific flags | ||
if (CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64) | ||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-execute-only -fuse-ld=lld -execute-only -ffixed-x18") | ||
endif() | ||
|
||
# link library | ||
target_link_libraries(nfcgate android log) | ||
target_link_libraries(nfcgate android log xh) | ||
# include directory | ||
target_include_directories(nfcgate PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src/main/jni/include/) | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.