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
795c09b2
Commit
795c09b2
authored
Mar 28, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak demo
parent
59726be9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
MyApp.java
app/src/main/java/com/swift/sandhook/MyApp.java
+5
-1
CtrHook.java
...src/main/java/com/swift/sandhook/testHookers/CtrHook.java
+5
-1
No files found.
app/src/main/java/com/swift/sandhook/MyApp.java
View file @
795c09b2
...
...
@@ -2,6 +2,7 @@ package com.swift.sandhook;
import
android.app.Activity
;
import
android.app.Application
;
import
android.os.Build
;
import
android.util.Log
;
import
com.swift.sandhook.test.TestClass
;
...
...
@@ -35,7 +36,10 @@ public class MyApp extends Application {
}
SandHook
.
disableVMInline
();
SandHook
.
passApiCheck
();
if
(
SandHookConfig
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
SandHook
.
passApiCheck
();
}
try
{
SandHook
.
addHookClass
(
JniHooker
.
class
,
...
...
app/src/main/java/com/swift/sandhook/testHookers/CtrHook.java
View file @
795c09b2
...
...
@@ -38,7 +38,11 @@ public class CtrHook {
@HookMode
(
HookMode
.
INLINE
)
public
static
void
onAdd1
(
TestClass
thiz
)
throws
Throwable
{
Log
.
e
(
"TestClassHook"
,
"add1 been hooked"
);
SandHook
.
callOriginByBackup
(
add1backup
,
thiz
);
try
{
SandHook
.
callOriginByBackup
(
add1backup
,
thiz
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@HookMethod
(
"add2"
)
...
...
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