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

《Android Native Hook工具实践》文章中的疑问 #4

Open
GToad opened this issue Aug 2, 2018 · 6 comments
Open

《Android Native Hook工具实践》文章中的疑问 #4

GToad opened this issue Aug 2, 2018 · 6 comments

Comments

@GToad
Copy link
Owner

GToad commented Aug 2, 2018

《Android Native Hook工具实践》文章里的问题就发这里哈,这样方便我定期从这个issue下面找东西补充文章。

@GToad
Copy link
Owner Author

GToad commented Aug 2, 2018

回答bitefoo的问题:默认是thumb模式编译,因此没有“LOCAL_ARM_MODE := arm”的话,就会优先编译成thumb指令集,而本项目中即便是thumb目标的应用,stub和hook_function也需要用arm编译。因此官方默认的thumb优先会影响本项目,所以本项目强制用“LOCAL_ARM_MODE := arm”来保证stub和hook_function部分一定是arm模式。

@dreamzgj
Copy link

dreamzgj commented Dec 2, 2018

GToad你好
请问关于NDK限制机制的linker.cpp是如何修改的?
可不可以不使用AOSP,直接修改自己手机系统中的/bin/linker和linker64跳过这个限制?

@GToad
Copy link
Owner Author

GToad commented Dec 11, 2018

static bool is_greylisted(const char* name, const soinfo* needed_by)
我把这整个函数直接return true了。

任何可以注入进进程的方法都可以的,不过别的方法可能会影响本库中__attribute__((constructor))自动执行,可能需要自己想办法调用这个so库里的hook功能函数。

@QiYueColdRain
Copy link

细节一中在确定thumb2要备份指令大小时,为什么不直接从首地址开始向后确定每条指令的类型来决定备份8 字节,10字节 or 12 字节,而是从后向前判断疑似指令来确定?

@GToad
Copy link
Owner Author

GToad commented Feb 27, 2019

正向反向都可以的

@GToad
Copy link
Owner Author

GToad commented Feb 28, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants