Skip to content

Difference between Xposed and VirtualXposed

weishu edited this page Sep 8, 2018 · 8 revisions

Although VirtualXposed can run Xposed modules, there are some differences between Xposed and VirtualXposed:

  1. VirtualXposed can not hook into system process, so the modules(eg: Gravity Box) which modify system process(such as system_server, systemui) can never work.
  2. Methods which are too short(less than 2 assembly instructions) can not be hooked or not stable.(eg: methods with empty body or return constant directly) 。If the method is in your app, you can add redundant statement : Log.d("fake", "just for vxp") to avoid this.
  3. When hook native method in VirtualXposed, you must load the corresponding so first. see:#39
  4. IXposedHookZygoteInit hooks into app process, not zygote.
  5. The field : isFirstApplication in XC_LoadPackage is always true.
  6. Do not support Resources hooks.
  7. When you need to call original method, please always use XposedBridge.invokeOriginalMethod()

How to know if app/modules run in VirtualXposed ?

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