Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
SandHook
Commits
23f76c5d
Commit
23f76c5d
authored
Jan 26, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable jit >= 7.0
parent
e7112454
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
native-lib.cpp
hooklib/src/main/cpp/native-lib.cpp
+5
-0
trampoline.h
hooklib/src/main/cpp/trampoline/trampoline.h
+1
-1
No files found.
hooklib/src/main/cpp/native-lib.cpp
View file @
23f76c5d
...
@@ -108,6 +108,11 @@ bool doHookWithInline(JNIEnv* env,
...
@@ -108,6 +108,11 @@ bool doHookWithInline(JNIEnv* env,
compileMethod
(
hookMethod
,
reinterpret_cast
<
void
*>
(
threadId
));
compileMethod
(
hookMethod
,
reinterpret_cast
<
void
*>
(
threadId
));
}
}
if
(
SDK_INT
>=
ANDROID_N
)
{
disableCompilable
(
originMethod
);
SandHook
::
Trampoline
::
flushCache
(
reinterpret_cast
<
Size
>
(
originMethod
),
SandHook
::
CastArtMethod
::
size
);
}
SandHook
::
HookTrampoline
*
hookTrampoline
=
trampolineManager
.
installInlineTrampoline
(
originMethod
,
hookMethod
,
backupMethod
);
SandHook
::
HookTrampoline
*
hookTrampoline
=
trampolineManager
.
installInlineTrampoline
(
originMethod
,
hookMethod
,
backupMethod
);
if
(
hookTrampoline
==
nullptr
)
if
(
hookTrampoline
==
nullptr
)
return
false
;
return
false
;
...
...
hooklib/src/main/cpp/trampoline/trampoline.h
View file @
23f76c5d
...
@@ -139,7 +139,7 @@ namespace SandHook {
...
@@ -139,7 +139,7 @@ namespace SandHook {
flushCache
((
Size
)
code
+
targetOffset
,
len
);
flushCache
((
Size
)
code
+
targetOffset
,
len
);
}
}
bool
flushCache
(
Size
addr
,
Size
len
)
{
static
bool
flushCache
(
Size
addr
,
Size
len
)
{
#if defined(__arm__)
#if defined(__arm__)
//clearCacheArm32(reinterpret_cast<char*>(addr), reinterpret_cast<char*>(addr + len));
//clearCacheArm32(reinterpret_cast<char*>(addr), reinterpret_cast<char*>(addr + len));
int
i
=
cacheflush
(
addr
,
addr
+
len
,
0
);
int
i
=
cacheflush
(
addr
,
addr
+
len
,
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment