Giter Club home page Giter Club logo

Comments (10)

jmpews avatar jmpews commented on July 18, 2024

try the latest commit, or like this ZzHook((void *)send, (void *)fake_send, (void **)&orig_send, common_pre_call, common_post_call, true);, use the true as the last arg. (ps: have a look with the demo project)

from dobby.

Xset-s avatar Xset-s commented on July 18, 2024

default

default

It crashes when lib loads
default

from dobby.

Xset-s avatar Xset-s commented on July 18, 2024

Hm. No, it crashes after post-call 🤔

default

from dobby.

jmpews avatar jmpews commented on July 18, 2024

emmm, i just test ok :(

android sdk version ?

from dobby.

Xset-s avatar Xset-s commented on July 18, 2024

android-19

from dobby.

jmpews avatar jmpews commented on July 18, 2024

emmm, sorry, it's 4.am now, i need sleep, and test again on morning. use the HookZz/demo/.zip ?

from dobby.

Xset-s avatar Xset-s commented on July 18, 2024

Ok :)
No, i use my own library and another apk. But it used to work

from dobby.

jmpews avatar jmpews commented on July 18, 2024

i test armv7 again, none crash case. 🤔

from dobby.

Xset-s avatar Xset-s commented on July 18, 2024

My build log:

C:\Users\Xset\Desktop\ElfHook\HookZz>ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=./Android.mk APP_ABI=armeabi-v7a APP_PLATFORM=android-19
Android NDK: WARNING:Android.mk:hookzz: LOCAL_LDLIBS is always ignored for static libraries

[armeabi-v7a] Compile thumb  : hookzz <= allocator.c
[armeabi-v7a] Compile thumb  : hookzz <= interceptor.c
[armeabi-v7a] Compile thumb  : hookzz <= memory.c
[armeabi-v7a] Compile thumb  : hookzz <= stack.c
[armeabi-v7a] Compile thumb  : hookzz <= tools.c
[armeabi-v7a] Compile thumb  : hookzz <= trampoline.c
[armeabi-v7a] Compile thumb  : hookzz <= interceptor-linux.c
[armeabi-v7a] Compile thumb  : hookzz <= memory-linux.c
[armeabi-v7a] Compile thumb  : hookzz <= thread-posix.c
[armeabi-v7a] Compile thumb  : hookzz <= instructions.c
[armeabi-v7a] Compile thumb  : hookzz <= reader-arm.c
[armeabi-v7a] Compile thumb  : hookzz <= reader-thumb.c
[armeabi-v7a] Compile thumb  : hookzz <= regs-arm.c
[armeabi-v7a] Compile thumb  : hookzz <= relocator-arm.c
././src/platforms/arch-arm/relocator-arm.c:48:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
1 warning generated.
[armeabi-v7a] Compile thumb  : hookzz <= relocator-thumb.c
././src/platforms/arch-arm/relocator-thumb.c:120:16: warning: incompatible integer to pointer conversion initializing
      'zz_addr_t *' (aka 'unsigned long *') with an expression of type 'zz_addr_t' (aka 'unsigned long'); take the
      address with & [-Wint-conversion]
    zz_addr_t *temp_address = insn_ctx->address;
               ^              ~~~~~~~~~~~~~~~~~
                              &
1 warning generated.
[armeabi-v7a] Compile thumb  : hookzz <= writer-arm.c
[armeabi-v7a] Compile thumb  : hookzz <= writer-thumb.c
[armeabi-v7a] Compile thumb  : hookzz <= backend-arm-helper.c
[armeabi-v7a] Compile thumb  : hookzz <= interceptor-arm.c
././src/platforms/backend-arm/interceptor-arm.c:19:52: warning: incompatible pointer to integer conversion passing
      'void *' to parameter of type 'zz_addr_t' (aka 'unsigned long') [-Wint-conversion]
    zz_arm_writer_init(&backend->arm_writer, NULL, NULL);
                                                   ^~~~
C:\Users\Xset\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\5.0.300080\include\stddef.h:105:16: note:
      expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
./src\platforms/arch-arm/writer-arm.h:30:82: note: passing argument to parameter 'target_ptr' here
void zz_arm_writer_init(ZzARMAssemblerWriter *self, zz_ptr_t data_ptr, zz_addr_t target_ptr);
                                                                                 ^
././src/platforms/backend-arm/interceptor-arm.c:23:56: warning: incompatible pointer to integer conversion passing
      'void *' to parameter of type 'zz_addr_t' (aka 'unsigned long') [-Wint-conversion]
    zz_thumb_writer_init(&backend->thumb_writer, NULL, NULL);
                                                       ^~~~
C:\Users\Xset\AppData\Local\Android\Sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\lib64\clang\5.0.300080\include\stddef.h:105:16: note:
      expanded from macro 'NULL'
#  define NULL ((void*)0)
               ^~~~~~~~~~
./src\platforms/arch-arm/writer-thumb.h:31:86: note: passing argument to parameter 'target_ptr' here
void zz_thumb_writer_init(ZzThumbAssemblerWriter *self, zz_ptr_t data_ptr, zz_addr_t target_ptr);
                                                                                     ^
././src/platforms/backend-arm/interceptor-arm.c:145:67: warning: incompatible pointer to integer conversion passing
      'char [256]' to parameter of type 'zz_addr_t' (aka 'unsigned long') [-Wint-conversion]
        zz_thumb_writer_reset(thumb_writer, temp_code_slice_data, temp_code_slice_data);
                                                                  ^~~~~~~~~~~~~~~~~~~~
./src\platforms/arch-arm/writer-thumb.h:33:87: note: passing argument to parameter 'target_ptr' here
void zz_thumb_writer_reset(ZzThumbAssemblerWriter *self, zz_ptr_t data_ptr, zz_addr_t target_ptr);
                                                                                      ^
3 warnings generated.

[armeabi-v7a] Compile thumb  : hookzz <= thunker-arm.c
[armeabi-v7a] Compile thumb  : hookzz <= common_memory_kit.c
[armeabi-v7a] Compile thumb  : hookzz <= linux_memory_kit.c
[armeabi-v7a] Compile thumb  : hookzz <= posix_memory_kit.c
[armeabi-v7a] Compile thumb  : hookzz <= posix_thread_kit.c
[armeabi-v7a] StaticLibrary  : libhookzz.a

from dobby.

jmpews avatar jmpews commented on July 18, 2024

fixed

from dobby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.