ElderDrivers / EdXposed

Elder driver Xposed Framework.
https://edxp.meowcat.org/
GNU General Public License v3.0
5.46k stars 631 forks source link

[BUG] hook systemMain not available #721

Closed ztony478 closed 3 years ago

ztony478 commented 3 years ago

什么情况/What happened?

      @Override
      public void initZygote(final StartupParam startupParam) throws Throwable {
               Class<?> at = Class.forName("android.app.ActivityThread");
               XposedBridge.hookAllMethods(at, "systemMain", new XC_MethodHook() {
                   @Override
                   protected void afterHookedMethod(MethodHookParam param) {
                       final ClassLoader loader = Thread.currentThread().getContextClassLoader();
                       XposedBridge.log("not get in systemMain");
                   }
               });
      }

Xposed模块列表/Xposed Module List (无) 允许截图/Screenshot allowed (无) Magisk模块列表/Magisk Module List (无) 允许截图/Screenshot allowed (无) EdXposed及Riru版本/Versions of EdXposed and Riru EdXposed: EdXposed-SandHook-v0.5.0.8 / EdXposed-YAHFA-v0.5.0.8 Riru: riru-v23.0-release EdXposedManager: EdXposedManager-4.6.0-pre-45756 Rom: lineage-17.1-20201206-nightly-gemini-signed 相关Logcat/Logcat (无)

jayjd commented 3 years ago

remove这一块确实有问题呀 应该用迭代器删除https://github.com/ElderDrivers/EdXposedManager/blob/master/app/src/main/java/org/meowcat/edxposed/manager/xposed/Enhancement.java 217行

kotori2 commented 3 years ago

YAHFA already hooked systemMain, and you can't hook it again. I think the best call is to change a hook point or change Xposed API. Gonna mark as won't fix.