EzXposed
object EzXposed
经典 Xposed API 82 的运行时入口。
推荐初始化顺序:
如果需要模块资源,在
IXposedHookZygoteInit.initZygote里调用 initZygote如果需要模块资源,调用 initModuleResources
在
IXposedHookLoadPackage.handleLoadPackage里调用 init
和上游保持一致,这里不会自动初始化模块资源或 application context, 需要由调用方按生命周期显式触发对应入口。
Properties
Link copied to clipboard
当前进程的 application context;过早访问时会抛异常。
Link copied to clipboard
当前进程的 application context;尚未可用时返回 null。
Link copied to clipboard
当前默认 ClassLoader。
Link copied to clipboard
当前模块 apk 路径;调用 initZygote 后可用。
Link copied to clipboard
当前模块资源;调用 initModuleResources 后可用。
Link copied to clipboard
当前包名。
Link copied to clipboard
当前进程名。
Link copied to clipboard
始终可用的 ClassLoader;未初始化时回退到 SystemClassLoader。
Functions
Link copied to clipboard
添加模块路径到目标 Context.resources。允许通过“R.xx.xxx”直接使用模块资源。
将模块资源路径注入到指定 resources。
Link copied to clipboard
fun initAppContext(context: Context? = getCurrentApplicationContext(), injectModuleAssetPath: Boolean = false)
手动缓存当前进程的 application context。
Link copied to clipboard
初始化模块资源。
Link copied to clipboard
在 IXposedHookZygoteInit.initZygote 阶段记录模块 apk 路径。