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
6e884926
Commit
6e884926
authored
Mar 13, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
331f9130
d2b7b3c7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
README.md
README.md
+10
-3
MyApp.java
app/src/main/java/com/swift/sandhook/MyApp.java
+2
-0
build.gradle
build.gradle
+1
-1
No files found.
README.md
View file @
6e884926
...
@@ -30,7 +30,7 @@ cant hook if lined
...
@@ -30,7 +30,7 @@ cant hook if lined
# how to use
# how to use
```
gradle
```
gradle
implementation
'com.swift.sandhook:hooklib:
2.5
.2'
implementation
'com.swift.sandhook:hooklib:
3.0
.2'
```
```
-
Annotation API
-
Annotation API
...
@@ -103,7 +103,14 @@ public class NewAnnotationApiHooker {
...
@@ -103,7 +103,14 @@ public class NewAnnotationApiHooker {
}
}
//first set debuggable
SandHookConfig
.
DEBUG
=
BuildConfig
.
DEBUG
;
and
and
//add hookers
SandHook
.
addHookClass
(
CtrHook
.
class
,
LogHooker
.
class
,
CustmizeHooker
.
class
,
ActivityHooker
.
class
,
ObjectHooker
.
class
);
SandHook
.
addHookClass
(
CtrHook
.
class
,
LogHooker
.
class
,
CustmizeHooker
.
class
,
ActivityHooker
.
class
,
ObjectHooker
.
class
);
you
can
also
use:
you
can
also
use:
...
@@ -114,7 +121,7 @@ SanHook.public static boolean hook(Member target, Method hook, Method backup) {}
...
@@ -114,7 +121,7 @@ SanHook.public static boolean hook(Member target, Method hook, Method backup) {}
if hookers is in plugin(like xposed):
if hookers is in plugin(like xposed):
```
groovy
```
groovy
provided
'com.swift.sandhook:hookannotation:
2.5
.2'
provided
'com.swift.sandhook:hookannotation:
3.0
.2'
```
```
in your plugin
in your plugin
...
@@ -129,7 +136,7 @@ backup method can call itself to avoid be inlining
...
@@ -129,7 +136,7 @@ backup method can call itself to avoid be inlining
Now you can use Xposed api:
Now you can use Xposed api:
```
groovy
```
groovy
implementation
'com.swift.sandhook:xposedcompat:
2.5
.2'
implementation
'com.swift.sandhook:xposedcompat:
3.0
.2'
```
```
```
java
```
java
...
...
app/src/main/java/com/swift/sandhook/MyApp.java
View file @
6e884926
...
@@ -24,6 +24,8 @@ public class MyApp extends Application {
...
@@ -24,6 +24,8 @@ public class MyApp extends Application {
public
void
onCreate
()
{
public
void
onCreate
()
{
super
.
onCreate
();
super
.
onCreate
();
SandHookConfig
.
DEBUG
=
BuildConfig
.
DEBUG
;
SandHook
.
disableVMInline
();
SandHook
.
disableVMInline
();
try
{
try
{
...
...
build.gradle
View file @
6e884926
...
@@ -30,7 +30,7 @@ ext {
...
@@ -30,7 +30,7 @@ ext {
userOrg
=
'ganyao114'
userOrg
=
'ganyao114'
groupId
=
'com.swift.sandhook'
groupId
=
'com.swift.sandhook'
repoName
=
'SandHook'
repoName
=
'SandHook'
publishVersion
=
'
2.9.5
'
publishVersion
=
'
3.0.2
'
desc
=
'android art hook'
desc
=
'android art hook'
website
=
'https://github.com/ganyao114/SandHook'
website
=
'https://github.com/ganyao114/SandHook'
licences
=
[
'Apache-2.0'
]
licences
=
[
'Apache-2.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