Skip to content

Difference between Xposed and VirtualXposed

weishu edited this page Apr 24, 2018 · 8 revisions

虽说 VirtualXposed 也能运行Xposed插件,但是与安装在系统路径的Xposed还是有一些差别,具体如下:

  1. VirtualXposed 不支持修改系统的Xposed模块。如重力工具箱,面板顶栏美化等。
  2. 在Android 8.0以上,由于类继承层次优化(CHA)的存在,hook单一实现的接口函数可能会存在问题(无法hook到);典型的比如 Application.attach 需要替换为 ContextWrapper.attachBaseContext。
  3. VirtualXposed 目前hook native函数的兼容性不如Xposed好。大量使用JNI实现的Xposed模块在特定的手机上可能运行不够稳定。(如微X模块,QX模块,情牵抢包)
  4. IXposedHookZygoteInit 接口含义发生变化;在VirtualXposed中实际为进程启动的入口,并不能hook zygote进程。
  5. XC_LoadPackage 中的 isFirstApplication 永远为true。
  6. 完全不支持资源hook。

如何判断是否运行在VirtualXposed中?

if (System.getProperty("vxp") != null) {
    // running in VirtualXposed
}
Clone this wiki locally