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
2beba56b
Commit
2beba56b
authored
Feb 22, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
catch error of load call origin class
parent
9fdd0a05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
HookStubManager.java
...swift/sandhook/xposedcompat/hookstub/HookStubManager.java
+8
-5
No files found.
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/HookStubManager.java
View file @
2beba56b
package
com
.
swift
.
sandhook
.
xposedcompat
.
hookstub
;
package
com
.
swift
.
sandhook
.
xposedcompat
.
hookstub
;
import
android.util.Log
;
import
com.swift.sandhook.SandHook
;
import
com.swift.sandhook.SandHook
;
import
com.swift.sandhook.SandHookMethodResolver
;
import
com.swift.sandhook.SandHookMethodResolver
;
import
com.swift.sandhook.utils.ParamWrapper
;
import
com.swift.sandhook.utils.ParamWrapper
;
...
@@ -162,20 +164,21 @@ public class HookStubManager {
...
@@ -162,20 +164,21 @@ public class HookStubManager {
return
null
;
return
null
;
return
new
StubMethodsInfo
(
stubArgs
,
curUseStubIndex
,
hook
,
backup
);
return
new
StubMethodsInfo
(
stubArgs
,
curUseStubIndex
,
hook
,
backup
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
throwabl
e
)
{
return
null
;
return
null
;
}
}
}
}
public
static
Method
getCallOriginMethod
(
int
args
,
int
index
)
{
public
static
Method
getCallOriginMethod
(
int
args
,
int
index
)
{
String
className
=
SandHook
.
is64Bit
()
?
MethodHookerStubs64
.
class
.
getName
()
:
MethodHookerStubs32
.
class
.
getName
();
Class
stubClass
=
SandHook
.
is64Bit
()
?
MethodHookerStubs64
.
class
:
MethodHookerStubs32
.
class
;
String
className
=
stubClass
.
getName
();
className
+=
"$"
;
className
+=
"$"
;
className
+=
getCallOriginClassName
(
args
,
index
);
className
+=
getCallOriginClassName
(
args
,
index
);
try
{
try
{
Class
callOriginClass
=
Class
.
forName
(
className
);
Class
callOriginClass
=
Class
.
forName
(
className
,
true
,
stubClass
.
getClassLoader
()
);
return
callOriginClass
.
getDeclaredMethod
(
"call"
,
long
[].
class
);
return
callOriginClass
.
getDeclaredMethod
(
"call"
,
long
[].
class
);
}
catch
(
Exception
e
)
{
}
catch
(
Throwable
e
)
{
e
.
printStackTrace
(
);
Log
.
e
(
"HookStubManager"
,
"load call origin class error!"
,
e
);
return
null
;
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