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
17cfb2c4
Commit
17cfb2c4
authored
Mar 24, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove useless code
parent
7ec4541b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
6 deletions
+3
-6
build.gradle
app/build.gradle
+1
-1
sandhook.cpp
hooklib/src/main/cpp/sandhook.cpp
+1
-4
trampoline_manager.cpp
hooklib/src/main/cpp/trampoline/trampoline_manager.cpp
+1
-1
No files found.
app/build.gradle
View file @
17cfb2c4
...
...
@@ -11,7 +11,7 @@ android {
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes
{
release
{
debug
{
minifyEnabled
false
proguardFiles
getDefaultProguardFile
(
'proguard-android.txt'
),
'proguard-rules.pro'
}
...
...
hooklib/src/main/cpp/sandhook.cpp
View file @
17cfb2c4
...
...
@@ -58,7 +58,6 @@ bool doHookWithReplacement(JNIEnv* env,
originMethod
->
backup
(
backupMethod
);
backupMethod
->
disableCompilable
();
backupMethod
->
disableInterpreterForO
();
backupMethod
->
tryDisableInline
();
if
(
!
backupMethod
->
isStatic
())
{
backupMethod
->
setPrivate
();
}
...
...
@@ -69,7 +68,6 @@ bool doHookWithReplacement(JNIEnv* env,
hookMethod
->
disableCompilable
();
hookMethod
->
flushCache
();
originMethod
->
tryDisableInline
();
originMethod
->
disableInterpreterForO
();
SandHook
::
HookTrampoline
*
hookTrampoline
=
trampolineManager
.
installReplacementTrampoline
(
originMethod
,
hookMethod
,
backupMethod
);
...
...
@@ -103,7 +101,7 @@ bool doHookWithInline(JNIEnv* env,
if
(
SDK_INT
>=
ANDROID_N
)
{
originMethod
->
disableCompilable
();
}
originMethod
->
tryDisableInline
();
originMethod
->
flushCache
();
SandHook
::
HookTrampoline
*
hookTrampoline
=
trampolineManager
.
installInlineTrampoline
(
originMethod
,
hookMethod
,
backupMethod
);
...
...
@@ -121,7 +119,6 @@ bool doHookWithInline(JNIEnv* env,
backupMethod
->
disableCompilable
();
}
backupMethod
->
disableInterpreterForO
();
backupMethod
->
tryDisableInline
();
if
(
!
backupMethod
->
isStatic
())
{
backupMethod
->
setPrivate
();
}
...
...
hooklib/src/main/cpp/trampoline/trampoline_manager.cpp
View file @
17cfb2c4
...
...
@@ -7,7 +7,7 @@
#include "../includes/log.h"
extern
int
SDK_INT
;
#define SWITCH_SETX0
tru
e
#define SWITCH_SETX0
fals
e
namespace
SandHook
{
...
...
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