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

Fix pending hook, fix hidden api bypass, fix nativehook, fix precompile flag, fix libart path #83

Closed
wants to merge 9 commits into from

Conversation

yujincheng08
Copy link
Contributor

@yujincheng08 yujincheng08 commented Apr 4, 2021

  1. Pending hook will fail in R when fixup static trampoline is called directly
  2. Some Q devices cherry-pick visiblyInitialized.
  3. Bypassing hidden API by meta-reflection is no longer working on R
  4. Pending hook will fail the first time the function is called because its hooked after ShouldUseInterpreterEntrypoint is called, in which it may return true.
  5. On Q devices, some system function is executable only. mprotect it to rwx before hooking.
  6. CompileDontBother should be set together with unsetting PreCompiled.

All situations are found, fixed and tested by LSPosed.

@yujincheng08 yujincheng08 changed the title [NOROOT] Fix pending hook, fix hidden api bypass, fix nativehook [NONROOT] Fix pending hook, fix hidden api bypass, fix nativehook Apr 4, 2021
@yujincheng08 yujincheng08 changed the title [NONROOT] Fix pending hook, fix hidden api bypass, fix nativehook Fix pending hook, fix hidden api bypass, fix nativehook, fix precompile flag May 2, 2021
@yujincheng08 yujincheng08 changed the title Fix pending hook, fix hidden api bypass, fix nativehook, fix precompile flag Fix pending hook, fix hidden api bypass, fix nativehook, fix precompile flag, fix libart path May 3, 2021
@@ -25,6 +38,7 @@ EXPORT void* SandGetSym(const char* so, const char* symb) {

extern "C"
EXPORT void* SandInlineHook(void* origin, void* replace) {
_make_rwx(origin, _page_size);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same fix is also needed for SandInlineHookSym!

AlienwareHe added a commit to AlienwareHe/sandhook-docs that referenced this pull request Jan 26, 2022
@lwugang lwugang mentioned this pull request Jul 20, 2022
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

Successfully merging this pull request may close these issues.

2 participants