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
34d95b6f
Commit
34d95b6f
authored
Mar 14, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tweak internal stub for Android Q
parent
96381848
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9319 additions
and
1396 deletions
+9319
-1396
genhookstubs.py
xposedcompat/genhookstubs.py
+1
-1
XposedCompat.java
...in/java/com/swift/sandhook/xposedcompat/XposedCompat.java
+1
-1
HookStubManager.java
...swift/sandhook/xposedcompat/hookstub/HookStubManager.java
+2
-1
MethodHookerStubs32.java
...t/sandhook/xposedcompat/hookstub/MethodHookerStubs32.java
+4657
-696
MethodHookerStubs64.java
...t/sandhook/xposedcompat/hookstub/MethodHookerStubs64.java
+4657
-696
DynamicBridge.java
.../swift/sandhook/xposedcompat/methodgen/DynamicBridge.java
+1
-1
No files found.
xposedcompat/genhookstubs.py
View file @
34d95b6f
...
...
@@ -61,7 +61,7 @@ TEMP_STUB_INFO = """
STUB_SIZES
=
[
10
,
20
,
30
,
30
,
30
,
30
,
30
,
20
,
10
,
10
,
5
,
5
,
3
]
HAS_BACKUP
=
Fals
e
;
HAS_BACKUP
=
Tru
e
;
def
getMethodId
(
args
,
index
):
...
...
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/XposedCompat.java
View file @
34d95b6f
...
...
@@ -27,7 +27,7 @@ public class XposedCompat {
//try to use internal stub hooker & backup method to speed up hook
public
static
volatile
boolean
useInternalStub
=
true
;
public
static
volatile
boolean
useNew
DexMaker
=
true
;
public
static
volatile
boolean
useNew
CallBackup
=
true
;
public
static
volatile
boolean
retryWhenCallOriginError
=
false
;
private
static
ClassLoader
sandHookXposedClassLoader
;
...
...
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/HookStubManager.java
View file @
34d95b6f
...
...
@@ -6,6 +6,7 @@ import com.swift.sandhook.SandHook;
import
com.swift.sandhook.SandHookMethodResolver
;
import
com.swift.sandhook.utils.ParamWrapper
;
import
com.swift.sandhook.wrapper.BackupMethodStubs
;
import
com.swift.sandhook.xposedcompat.XposedCompat
;
import
com.swift.sandhook.xposedcompat.utils.DexLog
;
import
java.lang.reflect.Constructor
;
...
...
@@ -44,7 +45,7 @@ public class HookStubManager {
Class
stubClass
=
SandHook
.
is64Bit
()
?
MethodHookerStubs64
.
class
:
MethodHookerStubs32
.
class
;
stubSizes
=
(
int
[])
XposedHelpers
.
getStaticObjectField
(
stubClass
,
"stubSizes"
);
Boolean
hasBackup
=
(
Boolean
)
XposedHelpers
.
getStaticObjectField
(
stubClass
,
"hasStubBackup"
);
hasStubBackup
=
hasBackup
==
null
?
false
:
hasBackup
;
hasStubBackup
=
hasBackup
!=
null
&&
(
hasBackup
&&
!
XposedCompat
.
useNewCallBackup
)
;
if
(
stubSizes
!=
null
&&
stubSizes
.
length
>
0
)
{
MAX_STUB_ARGS
=
stubSizes
.
length
-
1
;
curUseStubIndexes
=
new
AtomicInteger
[
MAX_STUB_ARGS
+
1
];
...
...
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/MethodHookerStubs32.java
View file @
34d95b6f
This diff is collapsed.
Click to expand it.
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/hookstub/MethodHookerStubs64.java
View file @
34d95b6f
This diff is collapsed.
Click to expand it.
xposedcompat/src/main/java/com/swift/sandhook/xposedcompat/methodgen/DynamicBridge.java
View file @
34d95b6f
...
...
@@ -24,7 +24,7 @@ import de.robv.android.xposed.XposedBridge;
public
final
class
DynamicBridge
{
private
static
final
HashMap
<
Member
,
Method
>
hookedInfo
=
new
HashMap
<>();
private
static
HookMaker
hookMaker
=
XposedCompat
.
useNew
DexMaker
?
new
HookerDexMakerNew
()
:
new
HookerDexMaker
();
private
static
HookMaker
hookMaker
=
XposedCompat
.
useNew
CallBackup
?
new
HookerDexMakerNew
()
:
new
HookerDexMaker
();
private
static
final
AtomicBoolean
dexPathInited
=
new
AtomicBoolean
(
false
);
private
static
File
dexDir
;
...
...
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