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
7ec4541b
Commit
7ec4541b
authored
Mar 22, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
44ec38da
f27fffbd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
5 deletions
+26
-5
README.md
README.md
+26
-5
No files found.
README.md
View file @
7ec4541b
# SandHook
Android ART Hook
## Version
[

](https://bintray.com/ganyao114/maven/hooklib/_latestVersion)
## Chinese
[
中文文档以及实现
](
https://blog.csdn.net/ganyao939543405/article/details/86661040
)
# arch support
...
...
@@ -33,7 +37,7 @@ cant hook if lined
implementation
'com.swift.sandhook:hooklib:3.1.0'
```
-
Annotation API
##
Annotation API
--------------------------------------------------------------------
...
...
@@ -49,7 +53,7 @@ public class ActivityHooker {
// can invoke to call origin
@HookMethodBackup
(
"onCreate"
)
@
MethodParams
(
Bundle
.
class
)
@
SkipParamCheck
static
Method
onCreateBackup
;
@HookMethodBackup
(
"onPause"
)
...
...
@@ -129,7 +133,7 @@ in your plugin
if OS <= 5.1
backup method can call itself to avoid be inlining
-
Xposed API
##
Xposed API
--------------------------------------------------------------------
...
...
@@ -176,22 +180,39 @@ because when ART trigger JIT from profiling, JIT will invoke -> ResolveCompiling
## Inline
### disable JIT inline
w
e can do nothing to prevent some methods been inlined before app start, but we can try to disable VM Jit Inline after launch.
W
e can do nothing to prevent some methods been inlined before app start, but we can try to disable VM Jit Inline after launch.
if you will hook some method that could be inlined, please call SandHook.disableVMInline()(OS >= 7.0) in Application.OnCreate()
### Deoptimize
You can also deoptimize a caller that inlined your hook method by SandHook.deCompile(caller), just implement >= 7.0
## Hidden API
SandHook.passApiCheck();
To bypass hidden api on P & Q
# Demo
non-Root Xposed Environment Demo (VirtualApp With SandHook):
## SandVXPosed
non-Root Xposed Environment Demo (VirtualApp with SandHook):
https://github.com/ganyao114/SandVXposed
## EdXposed(SandHook Brunch)
Unofficial xposed framework >= 8.0
https://github.com/ElderDrivers/EdXposed/tree/sandhook
# Android Q(10.0)
in MyApp.java
...
...
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