类 XposedInterfaceWrapper
- 所有已实现的接口:
XposedInterface
- 直接已知子类:
XposedModule
XposedInterface used by modules to shield framework implementation details.-
嵌套类概要
从接口继承的嵌套类/接口 io.github.libxposed.api.XposedInterface
XposedInterface.Chain, XposedInterface.CtorInvoker<T>, XposedInterface.ExceptionMode, XposedInterface.HookBuilder, XposedInterface.Hooker, XposedInterface.HookHandle, XposedInterface.Invoker<T extends XposedInterface.Invoker<T,U>, U extends Executable> -
字段概要
从接口继承的字段 io.github.libxposed.api.XposedInterface
API_101, LIB_API, PRIORITY_DEFAULT, PRIORITY_HIGHEST, PRIORITY_LOWEST, PROP_CAP_REMOTE, PROP_CAP_SYSTEM, PROP_RT_API_PROTECTION -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明final voidAttaches the framework interface to the module.final booleandeoptimize(Executable executable) Deoptimizes a method / constructor in case hooked callee is not called because of inline.final intGets the runtime Xposed API version.final StringGets the Xposed framework name of current implementation.final longGets the Xposed framework properties.final StringGets the Xposed framework version of current implementation.final longGets the Xposed framework version code of current implementation.final <T> XposedInterface.CtorInvoker<T> getInvoker(Constructor<T> constructor) Get a constructor invoker for the given constructor.final XposedInterface.Invoker<?, Method> getInvoker(Method method) Get a method invoker for the given method.final ApplicationInfoGets the application info of the module.final SharedPreferencesgetRemotePreferences(String name) Gets remote preferences stored in Xposed framework.hook(Executable origin) Hook a method / constructor.hookClassInitializer(Class<?> origin) Hook the static initializer (<clinit>) of a class.final String[]List all files in the module's shared data directory.final voidWrites a message to the Xposed log.final voidWrites a message to the Xposed log.final ParcelFileDescriptoropenRemoteFile(String name) Open a file in the module's shared data directory.
-
构造器详细资料
-
XposedInterfaceWrapper
public XposedInterfaceWrapper()
-
-
方法详细资料
-
attachFramework
Attaches the framework interface to the module. Modules should never call this method.- 参数:
base- The framework interface
-
getApiVersion
public final int getApiVersion()从接口复制的说明:XposedInterfaceGets the runtime Xposed API version. Framework implementations must not override this method.- 指定者:
getApiVersion在接口中XposedInterface
-
getFrameworkName
从接口复制的说明:XposedInterfaceGets the Xposed framework name of current implementation.- 指定者:
getFrameworkName在接口中XposedInterface
-
getFrameworkVersion
从接口复制的说明:XposedInterfaceGets the Xposed framework version of current implementation.- 指定者:
getFrameworkVersion在接口中XposedInterface
-
getFrameworkVersionCode
public final long getFrameworkVersionCode()从接口复制的说明:XposedInterfaceGets the Xposed framework version code of current implementation.- 指定者:
getFrameworkVersionCode在接口中XposedInterface
-
getFrameworkProperties
public final long getFrameworkProperties()从接口复制的说明:XposedInterfaceGets the Xposed framework properties. Properties with prefixPROP_RT_may change among launches.- 指定者:
getFrameworkProperties在接口中XposedInterface
-
hook
从接口复制的说明:XposedInterfaceHook a method / constructor.- 指定者:
hook在接口中XposedInterface- 参数:
origin- The executable to be hooked- 返回:
- The builder for the hook
-
hookClassInitializer
从接口复制的说明:XposedInterfaceHook the static initializer (<clinit>) of a class.The static initializer is treated as a regular
static void()method with no parameters. Accordingly, in theXposedInterface.Chainpassed to the hooker:XposedInterface.Chain.getExecutable()returns a syntheticMethodrepresenting the static initializer.XposedInterface.Chain.getThisObject()always returnsnull.XposedInterface.Chain.getArgs()returns an empty list.XposedInterface.Chain.proceed()returnsnull.
Note: If the class is already initialized, the hook will never be called.
- 指定者:
hookClassInitializer在接口中XposedInterface- 参数:
origin- The class whose static initializer is to be hooked- 返回:
- The builder for the hook
-
deoptimize
从接口复制的说明:XposedInterfaceDeoptimizes a method / constructor in case hooked callee is not called because of inline.By deoptimizing the method, the runtime will fall back to calling all callees without inlining. For example, when a short hooked method B is invoked by method A, the callback to B is not invoked after hooking, which may mean A has inlined B inside its method body. To force A to call the hooked B, you can deoptimize A and then your hook can take effect.
Generally, you need to find all the callers of your hooked callee, and that can hardly be achieved (but you can still search all callers by using DexKit). Use this method if you are sure the deoptimized callers are all you need. Otherwise, it would be better to change the hook point or to deoptimize the whole app manually (by simply reinstalling the app without uninstall).
- 指定者:
deoptimize在接口中XposedInterface- 参数:
executable- The method / constructor to deoptimize- 返回:
- Indicate whether the deoptimizing succeed or not
-
getInvoker
从接口复制的说明:XposedInterfaceGet a method invoker for the given method. Invocations through invokers will bypass access checks. The default type of the invoker isXposedInterface.Invoker.Type.Chain.FULL.- 指定者:
getInvoker在接口中XposedInterface- 参数:
method- The method to get the invoker for- 返回:
- The method invoker
-
getInvoker
@NonNull public final <T> XposedInterface.CtorInvoker<T> getInvoker(@NonNull Constructor<T> constructor) 从接口复制的说明:XposedInterfaceGet a constructor invoker for the given constructor. Invocations through invokers will bypass access checks. The default type of the invoker isXposedInterface.Invoker.Type.Chain.FULL.- 指定者:
getInvoker在接口中XposedInterface- 类型参数:
T- The type of the constructor- 参数:
constructor- The constructor to get the invoker for- 返回:
- The constructor invoker
-
log
从接口复制的说明:XposedInterfaceWrites a message to the Xposed log.- 指定者:
log在接口中XposedInterface- 参数:
priority- The log priority, seeLogtag- The log tagmsg- The log message
-
log
public final void log(int priority, @Nullable String tag, @NonNull String msg, @Nullable Throwable tr) 从接口复制的说明:XposedInterfaceWrites a message to the Xposed log.- 指定者:
log在接口中XposedInterface- 参数:
priority- The log priority, seeLogtag- The log tagmsg- The log messagetr- An exception to log
-
getRemotePreferences
从接口复制的说明:XposedInterfaceGets remote preferences stored in Xposed framework. Note that those are read-only in hooked apps.- 指定者:
getRemotePreferences在接口中XposedInterface- 参数:
name- Group name- 返回:
- The preferences
-
getModuleApplicationInfo
从接口复制的说明:XposedInterfaceGets the application info of the module.- 指定者:
getModuleApplicationInfo在接口中XposedInterface
-
listRemoteFiles
从接口复制的说明:XposedInterfaceList all files in the module's shared data directory.- 指定者:
listRemoteFiles在接口中XposedInterface- 返回:
- The file list
-
openRemoteFile
@NonNull public final ParcelFileDescriptor openRemoteFile(@NonNull String name) throws FileNotFoundException 从接口复制的说明:XposedInterfaceOpen a file in the module's shared data directory. The file is opened in read-only mode.- 指定者:
openRemoteFile在接口中XposedInterface- 参数:
name- File name, must not contain path separators and . or ..- 返回:
- The file descriptor
- 抛出:
FileNotFoundException- If the file does not exist or the path is forbidden
-