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
93372c42
Commit
93372c42
authored
Feb 21, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add useInternalStub switcher
parent
3235b9da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
XposedCompat.java
...in/java/com/swift/sandhook/xposedcompat/XposedCompat.java
+2
-0
DynamicBridge.java
.../swift/sandhook/xposedcompat/methodgen/DynamicBridge.java
+4
-1
No files found.
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java
View file @
93372c42
...
@@ -25,6 +25,8 @@ public class XposedCompat {
...
@@ -25,6 +25,8 @@ public class XposedCompat {
public
static
String
processName
;
public
static
String
processName
;
public
static
boolean
isFirstApplication
;
public
static
boolean
isFirstApplication
;
//try to use internal stub hooker & backup method to speed up hook
public
static
volatile
boolean
useInternalStub
=
true
;
public
static
volatile
boolean
retryWhenCallOriginError
=
false
;
public
static
volatile
boolean
retryWhenCallOriginError
=
false
;
private
static
ClassLoader
sandHookXposedClassLoader
;
private
static
ClassLoader
sandHookXposedClassLoader
;
...
...
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/methodgen/DynamicBridge.java
View file @
93372c42
...
@@ -58,7 +58,10 @@ public final class DynamicBridge {
...
@@ -58,7 +58,10 @@ public final class DynamicBridge {
}
}
Trace
.
beginSection
(
"SandHook-Xposed"
);
Trace
.
beginSection
(
"SandHook-Xposed"
);
long
timeStart
=
System
.
currentTimeMillis
();
long
timeStart
=
System
.
currentTimeMillis
();
HookMethodEntity
stub
=
HookStubManager
.
getHookMethodEntity
(
hookMethod
);
HookMethodEntity
stub
=
null
;
if
(
XposedCompat
.
useInternalStub
)
{
stub
=
HookStubManager
.
getHookMethodEntity
(
hookMethod
);
}
if
(
stub
!=
null
)
{
if
(
stub
!=
null
)
{
SandHook
.
hook
(
new
HookWrapper
.
HookEntity
(
hookMethod
,
stub
.
hook
,
stub
.
backup
));
SandHook
.
hook
(
new
HookWrapper
.
HookEntity
(
hookMethod
,
stub
.
hook
,
stub
.
backup
));
entityMap
.
put
(
hookMethod
,
stub
);
entityMap
.
put
(
hookMethod
,
stub
);
...
...
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