Skip to content

mirror · LoadedApk ​

镜像真实类 android.app.LoadedApk,用 Ref 引用对象包装其隐藏成员。

镜像的字段/方法 ​

  • public static RefObject<ApplicationInfo> mApplicationInfo
  • public static RefMethod<Application> makeApplication
  • public static RefMethod<IServiceConnection> getServiceDispatcher
  • public static RefMethod<IServiceConnection> forgetServiceDispatcher
  • public static RefMethod<ClassLoader> getClassLoader
  • public static RefMethod<IInterface> getIIntentReceiver
  • public static RefObject<BroadcastReceiver> mReceiver
  • public static RefObject<IIntentReceiver> mIIntentReceiver
  • public static RefObject<WeakReference> mDispatcher
  • public static RefObject<ServiceConnection> mConnection
  • public static RefObject<Context> mContext
  • public static RefObject<WeakReference> mDispatcher

用途 ​

配合 RefClass.load 在运行时绑定到真实 Android 类的对应成员,让 VirtualXposed 以类型安全方式访问这些隐藏 API。详见 反射框架 mirror 与 mirror 总览.

真实类与使用方 ​

镜像的真实类为 android.app.LoadedApk(@hide 隐藏 API),被以下模块引用:

使用方模块
am/MethodProxies.javaam 代理
am/BroadcastSystem.javaserver/am

镜像绑定与访问 ​

基于 VirtualApp 与 epic,仅供学习研究。VirtualApp 禁止商用。