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
dbab411b
Commit
dbab411b
authored
Feb 12, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update doc
parent
7c9757e1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
186 deletions
+41
-186
README.md
README.md
+40
-2
build.gradle
build.gradle
+1
-1
package.html
...va/external/org/apache/commons/lang3/builder/package.html
+0
-28
package.html
.../external/org/apache/commons/lang3/exception/package.html
+0
-27
package.html
...va/external/org/apache/commons/lang3/mutable/package.html
+0
-29
overview.html
...main/java/external/org/apache/commons/lang3/overview.html
+0
-23
package.html
.../main/java/external/org/apache/commons/lang3/package.html
+0
-25
package.html
...va/external/org/apache/commons/lang3/reflect/package.html
+0
-29
package.html
...java/external/org/apache/commons/lang3/tuple/package.html
+0
-22
No files found.
README.md
View file @
dbab411b
...
...
@@ -30,9 +30,13 @@ cant hook if lined
# how to use
```
gradle
implementation
'com.swift.sandhook:hooklib:
1.1.1
'
implementation
'com.swift.sandhook:hooklib:
2.0.0
'
```
-
Annotation API
--------------------------------------------------------------------
-
hook method must be a static method
-
first par must be this if method is not static
-
method description must "same"(can be isAssignableFrom) with origin method
...
...
@@ -91,7 +95,7 @@ SanHook.public static boolean hook(Member target, Method hook, Method backup) {}
if hookers is in plugin(like xposed):
```
groovy
provided
'com.swift.sandhook:hookannotation:
1.1.1
'
provided
'com.swift.sandhook:hookannotation:
2.0.0
'
```
in your plugin
...
...
@@ -99,6 +103,40 @@ in your plugin
if OS <= 5.1
backup method can call itself to avoid be inlining
-
Xposed API
--------------------------------------------------------------------
Now you can use Xposed api:
```
groovy
provided
'com.swift.sandhook:xposedcompat:2.0.0'
```
```
java
//setup for xposed
XposedCompat
.
cacheDir
=
getCacheDir
();
XposedCompat
.
context
=
this
;
XposedCompat
.
classLoader
=
getClassLoader
();
XposedCompat
.
isFirstApplication
=
true
;
//do hook
XposedHelpers
.
findAndHookMethod
(
Activity
.
class
,
"onResume"
,
new
XC_MethodHook
()
{
@Override
protected
void
beforeHookedMethod
(
MethodHookParam
param
)
throws
Throwable
{
super
.
beforeHookedMethod
(
param
);
Log
.
e
(
"XposedCompat"
,
"beforeHookedMethod: "
+
param
.
method
.
getName
());
}
@Override
protected
void
afterHookedMethod
(
MethodHookParam
param
)
throws
Throwable
{
super
.
afterHookedMethod
(
param
);
Log
.
e
(
"XposedCompat"
,
"afterHookedMethod: "
+
param
.
method
.
getName
());
}
});
```
# References
-
Epic:https://github.com/tiann/epic
...
...
build.gradle
View file @
dbab411b
...
...
@@ -30,7 +30,7 @@ ext {
userOrg
=
'ganyao114'
groupId
=
'com.swift.sandhook'
repoName
=
'SandHook'
publishVersion
=
'
1.1.1
'
publishVersion
=
'
2.0.0
'
desc
=
'android art hook'
website
=
'https://github.com/ganyao114/SandHook'
licences
=
[
'Apache-2.0'
]
...
...
xposedcompat/src/main/java/external/org/apache/commons/lang3/builder/package.html
deleted
100644 → 0
View file @
7c9757e1
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
Assists in creating consistent
<code>
equals(Object)
</code>
,
<code>
toString()
</code>
,
<code>
hashCode()
</code>
, and
<code>
compareTo(Object)
</code>
methods.
@see java.lang.Object#equals(Object)
@see java.lang.Object#toString()
@see java.lang.Object#hashCode()
@see java.lang.Comparable#compareTo(Object)
@since 1.0
<p>
These classes are not thread-safe.
</p>
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/exception/package.html
deleted
100644 → 0
View file @
7c9757e1
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
Provides functionality for Exceptions.
<p>
Contains the concept of an exception with context i.e. such an exception
will contain a map with keys and values. This provides an easy way to pass valuable
state information at exception time in useful form to a calling process.
</p>
<p>
Lastly, {@link org.apache.commons.lang3.exception.ExceptionUtils}
also contains
<code>
Throwable
</code>
manipulation and examination routines.
</p>
@since 1.0
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/mutable/package.html
deleted
100644 → 0
View file @
7c9757e1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<title></title>
</head>
<body>
Provides typed mutable wrappers to primitive values and Object.
@since 2.1
<p>
These classes are not thread-safe.
</p>
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/overview.html
deleted
100644 → 0
View file @
7c9757e1
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
<p>
This document is the API specification for the Apache Commons Lang library.
</p>
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/package.html
deleted
100644 → 0
View file @
7c9757e1
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
Provides highly reusable static utility methods, chiefly concerned
with adding value to the {@link java.lang} classes.
@since 1.0
<p>
Most of these classes are immutable and thus thread-safe.
However Charset is not currently guaranteed thread-safe under all circumstances.
</p>
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/reflect/package.html
deleted
100644 → 0
View file @
7c9757e1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<title></title>
</head>
<body>
Accumulates common high-level uses of the
<code>
java.lang.reflect
</code>
APIs.
@since 3.0
<p>
These classes are immutable, and therefore thread-safe.
</p>
</body>
</html>
xposedcompat/src/main/java/external/org/apache/commons/lang3/tuple/package.html
deleted
100644 → 0
View file @
7c9757e1
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<body>
Tuple classes, starting with a Pair class in version 3.0.
@since 3.0
</body>
</html>
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