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

armeabi-v7a hook失败,用xhook库能成功 #55

Open
richcx opened this issue Sep 22, 2022 · 4 comments
Open

armeabi-v7a hook失败,用xhook库能成功 #55

richcx opened this issue Sep 22, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@richcx
Copy link

richcx commented Sep 22, 2022

bytehook Version

1.0.5

Android OS Version

6.0

Android ABIs

armeabi-v7a

Device Manufacturers and Models

模拟器

Describe the Bug

ANDROID_API < 21, 运行时apilevel=23,尝试修改,默认没走/proc/self/maps,改成走/proc/self/maps部分能成功,不过app会闪退

@richcx richcx added the bug Something isn't working label Sep 22, 2022
@richcx
Copy link
Author

richcx commented Sep 22, 2022

刚从xhook升级到bhook,armeabi-v8a一直没问题,测试armeabi-v7a就失败了,目前稳定性还是xhook稳定点,线上一直用xhook,希望能尽快修复,不想改回去了

@caikelun
Copy link
Member

有几个问题:

  1. 你说的“尝试修改”是否指你自己修改了bytehook的代码?
  2. 崩溃问题请提供tombstone或coredump,否则无法分析
  3. 你的模拟器是否是android-x86 + houdini环境?如果是的话,可以参照文档试试“手动模式”。默认的“自动模式”会用到trampoline,不一定能在模拟器中运行。

@richcx
Copy link
Author

richcx commented Oct 8, 2022

  1. 我的测试环境是"网易MuMu模拟器,编译时ANDROID_API < 21, 运行时apilevel=23“,打Log发现走的是dl_iterate_phdr,没有hook住dlopen,导致找不到我需要hook的动态库。尝试修改强制走bh_dl_iterate_by_maps,可以找到我的动态库了,但是hook open close write 等系统函数都OK,就是hook stat函数失败,蚕食修改bh_dl_iterate_by_maps内权限判断后成功hook住stat了。然后跑去夜神模拟器测试又闪退了。说明一下:arm64下都是没问题的,armeabi-v7a才会有这个问题。
  2. 暂时没有coredump,闪退日志信息很少,无法分析
  3. 我用的就是模拟器,手机上只打包armeabi-v7a的动态库,也是一样会hook失败的。我一直用的是“手动模式”

@Mr-JingShi
Copy link
Contributor

请参考下:在夜神模拟器上跑armeabi-v7a包相关问题咨询 #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants