public final class DexposedBridge
extends java.lang.Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
DexposedBridge.CopyOnWriteSortedSet<E> |
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.ClassLoader |
BOOTCLASSLOADER |
| 构造器和说明 |
|---|
DexposedBridge() |
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
canDexposed(android.content.Context context)
Check device if can run dexposed, and load libs auto.
|
static XC_MethodHook.Unhook |
findAndHookMethod(java.lang.Class<?> clazz,
java.lang.String methodName,
java.lang.Object... parameterTypesAndCallback) |
static java.util.Set<XC_MethodHook.Unhook> |
hookAllConstructors(java.lang.Class<?> hookClass,
XC_MethodHook callback) |
static java.util.Set<XC_MethodHook.Unhook> |
hookAllMethods(java.lang.Class<?> hookClass,
java.lang.String methodName,
XC_MethodHook callback) |
static XC_MethodHook.Unhook |
hookMethod(java.lang.reflect.Member hookMethod,
XC_MethodHook callback)
Hook any method with the specified callback
|
static java.lang.Object |
invokeOriginalMethod(java.lang.reflect.Member method,
java.lang.Object thisObject,
java.lang.Object[] args)
Basically the same as
Method.invoke(java.lang.Object, java.lang.Object...), but calls the original method
as it was before the interception by Xposed. |
static java.lang.Object |
invokeSuper(java.lang.Object obj,
java.lang.reflect.Member method,
java.lang.Object... args) |
static void |
log(java.lang.String text)
Writes a message to BASE_DIR/log/debug.log (needs to have chmod 777)
|
static void |
log(java.lang.Throwable t)
Log the stack trace
|
static void |
unhookAllMethods() |
static void |
unhookMethod(java.lang.reflect.Member hookMethod,
XC_MethodHook callback)
Removes the callback for a hooked method
|
public static void log(java.lang.String text)
text - log messagepublic static void log(java.lang.Throwable t)
t - The Throwable object for the stacktracelog(String)public static XC_MethodHook.Unhook hookMethod(java.lang.reflect.Member hookMethod, XC_MethodHook callback)
hookMethod - The method to be hookedcallback - public static void unhookMethod(java.lang.reflect.Member hookMethod,
XC_MethodHook callback)
hookMethod - The method for which the callback should be removedcallback - The reference to the callback as specified in hookMethod(java.lang.reflect.Member, com.taobao.android.dexposed.XC_MethodHook)public static java.util.Set<XC_MethodHook.Unhook> hookAllMethods(java.lang.Class<?> hookClass, java.lang.String methodName, XC_MethodHook callback)
public static XC_MethodHook.Unhook findAndHookMethod(java.lang.Class<?> clazz, java.lang.String methodName, java.lang.Object... parameterTypesAndCallback)
public static void unhookAllMethods()
public static java.util.Set<XC_MethodHook.Unhook> hookAllConstructors(java.lang.Class<?> hookClass, XC_MethodHook callback)
public static boolean canDexposed(android.content.Context context)
public static java.lang.Object invokeSuper(java.lang.Object obj,
java.lang.reflect.Member method,
java.lang.Object... args)
throws java.lang.NoSuchFieldException
java.lang.NoSuchFieldExceptionpublic static java.lang.Object invokeOriginalMethod(java.lang.reflect.Member method,
java.lang.Object thisObject,
java.lang.Object[] args)
throws java.lang.NullPointerException,
java.lang.IllegalAccessException,
java.lang.IllegalArgumentException,
java.lang.reflect.InvocationTargetException
Method.invoke(java.lang.Object, java.lang.Object...), but calls the original method
as it was before the interception by Xposed. Also, access permissions are not checked.method - Method to be calledthisObject - For non-static calls, the "this" pointerargs - Arguments for the method call as Object[] arrayjava.lang.NullPointerException - if receiver == null for a non-static methodjava.lang.IllegalAccessException - if this method is not accessible (see AccessibleObject)java.lang.IllegalArgumentException - if the number of arguments doesn't match the number of parameters, the receiver
is incompatible with the declaring class, or an argument could not be unboxed
or converted by a widening conversion to the corresponding parameter typejava.lang.reflect.InvocationTargetException - if an exception was thrown by the invoked method