Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hook美团众包没效果 #34

Closed
LiuYiGL opened this issue Apr 19, 2023 · 7 comments
Closed

Hook美团众包没效果 #34

LiuYiGL opened this issue Apr 19, 2023 · 7 comments
Labels
wontfix This will not be worked on

Comments

@LiuYiGL
Copy link

LiuYiGL commented Apr 19, 2023

美团众包的版本号:9.6.5.3347 (没加固)

@KyuubiRan 的 EzXHelper 去 Hook 有效果

具体代码:

object TestHooker : YukiBaseHooker() {
    override fun onHook() {

        "com.meituan.banma.main.activity.MainActivity".hook {
            injectMember {
                method { name("onCreate") }
                afterHook {
                    loggerD(msg = "YukiHook:执行后")
                }
            }
        }

        "com.meituan.banma.main.activity.MainActivity".toClass()
            .method { name("onCreate") }
            .give()!!.createHook {
                after {
                    loggerD(msg = "EzXHelper:执行后")
                }
            }
    }
}

log输出:
YukiHook:Find Method [public void com.meituan.banma.main.activity.MainActivity.onCreate(android.os.Bundle)] takes 0ms [Default] 但没执行后
EzXHelper: 有执行后

试过只用其中一个Hook,效果一样
EzXHelper 底层也是用 XposedBridge#hookMethod 的方法实现的
框架是Lsposed 1.8.5 Zygisk

实在搞不清楚是哪里出了问题

@fankes
Copy link
Collaborator

fankes commented Apr 19, 2023

这里不负责解决特定 Hook 问题,有问题请去 Telegram 群组寻求帮助。

@fankes fankes closed this as not planned Won't fix, can't repro, duplicate, stale Apr 19, 2023
@fankes fankes added the wontfix This will not be worked on label Apr 19, 2023
@LiuYiGL
Copy link
Author

LiuYiGL commented Apr 19, 2023

了解,希望作者可以优化这个问题,可能是因为有某些原因导致了Hook无效

@fankes
Copy link
Collaborator

fankes commented Apr 19, 2023

#33 后期会启用新 API,这些可能的问题都会解决

@LiuYiGL
Copy link
Author

LiuYiGL commented Apr 19, 2023

嗯嗯,lsposd 的新api 我还没怎么看,对了,刚刚补充一个,上面这个Hooker 在loadApp及以外 的作用域时,是可以生效的

但是如果在App运行时就是在生命周期中进行loadHooker的话就会无效,这是一种特性吗?

@fankes
Copy link
Collaborator

fankes commented Apr 19, 2023

嗯嗯,lsposd 的新api 我还没怎么看,对了,刚刚补充一个,上面这个Hooker 在loadApp及以外 的作用域时,是可以生效的

但是如果在App运行时就是在生命周期中进行loadHooker的话就会无效,这是一种特性吗?

这个可能不是 bug,你去了解一下 Xposed 的装载时机就知道了,有些应用进行了加固,可能会有变化,具体可以看这里

@LiuYiGL
Copy link
Author

LiuYiGL commented Apr 19, 2023

就我这个情况在生命周期里自己写原生的XposedBridge.hookMethod() 方法的是可以hook到的

@fankes
Copy link
Collaborator

fankes commented Apr 19, 2023

#33 吧,我也不想研究了,之前的代码挺屎的 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants