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
5eb40da3
Commit
5eb40da3
authored
Feb 21, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix param parser of internal stub
parent
a9debfed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
HookMethodEntity.java
...wift/sandhook/xposedcompat/hookstub/HookMethodEntity.java
+5
-2
HookStubManager.java
...swift/sandhook/xposedcompat/hookstub/HookStubManager.java
+2
-0
No files found.
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/HookMethodEntity.java
View file @
5eb40da3
...
...
@@ -41,13 +41,16 @@ public class HookMethodEntity {
public
long
[]
getArgsAddress
(
long
[]
oldAddress
,
Object
...
args
)
{
if
(
oldAddress
==
null
||
oldAddress
.
length
==
0
)
return
new
long
[
0
];
long
[]
addresses
=
new
long
[
oldAddress
.
length
]
;
long
[]
addresses
;
int
argStart
=
0
;
if
(!
isStatic
())
{
argStart
=
1
;
addresses
=
new
long
[
oldAddress
.
length
+
1
];
addresses
[
0
]
=
oldAddress
[
0
];
}
else
{
addresses
=
new
long
[
oldAddress
.
length
];
}
for
(
int
i
=
argStart
;
i
<
parType
.
length
+
argStart
;
i
++)
{
for
(
int
i
=
0
;
i
<
parType
.
length
;
i
++)
{
addresses
[
i
+
argStart
]
=
ParamWrapper
.
objectToAddress
(
parType
[
i
],
args
[
i
]);
}
return
addresses
;
...
...
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/HookStubManager.java
View file @
5eb40da3
...
...
@@ -3,6 +3,7 @@ package com.swift.sandhook.xposedcompat.hookstub;
import
com.swift.sandhook.SandHook
;
import
com.swift.sandhook.SandHookMethodResolver
;
import
com.swift.sandhook.utils.ParamWrapper
;
import
com.swift.sandhook.xposedcompat.utils.DexLog
;
import
java.lang.reflect.Constructor
;
import
java.lang.reflect.Member
;
...
...
@@ -97,6 +98,7 @@ public class HookStubManager {
if
(
tryCompileAndResolveCallOriginMethod
(
entity
.
backup
,
stubMethodInfo
.
args
,
stubMethodInfo
.
index
))
{
return
entity
;
}
else
{
DexLog
.
w
(
"internal stub <"
+
entity
.
hook
.
getName
()
+
"> call origin compile failure, skip use internal stub"
);
return
null
;
}
}
...
...
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