WrBug / dumpDex

💯一款Android脱壳工具,需要xposed支持, 易开发已集成该项目。
https://github.com/WrBug/DeveloperHelper
MIT License
3.03k stars 615 forks source link

编译不通过 #23

Closed luoxiaoy closed 6 years ago

luoxiaoy commented 6 years ago

编译环境 Android Studio 3.0.1 inlineHook.c

include <arm-linux-androideabi/asm/ptrace.h>

Error:(19, 10) fatal error: 'arm-linux-androideabi/asm/ptrace.h' file not found

JuneLeGency commented 6 years ago

怎么解的? 我是报#include <asm/hwcap.h> 这个

WrBug commented 6 years ago

升级下 ndk版本

JuneLeGency commented 6 years ago

我的已经是r17 了

WrBug commented 6 years ago

日志贴出来看看

JuneLeGency commented 6 years ago
Build command failed.
Error while executing process /Users/legency/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/legency/StudioProjects/personal/dumpDex/app/.externalNativeBuild/cmake/debug/x86_64 --target nativeDump}
[1/8] Building CXX object CMakeFiles/nativeDump.dir/src/main/cpp/native.cpp.o
[2/8] Building C object CMakeFiles/nativeDump.dir/src/main/cpp/dlopen.c.o
[3/8] Building C object CMakeFiles/nativeDump.dir/src/main/cpp/inlineHook.c.o
[4/8] Building C object CMakeFiles/nativeDump.dir/src/main/cpp/relocate.c.o
[5/8] Building CXX object CMakeFiles/nativeDump.dir/src/main/cpp/And64InlineHook.cpp.o
[6/8] Building CXX object CMakeFiles/nativeDump.dir/src/main/cpp/util/deviceutils.cpp.o
[7/8] Building CXX object CMakeFiles/nativeDump.dir/src/main/cpp/util/fileutils.cpp.o
FAILED: /Users/legency/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang  --target=x86_64-none-linux-android --gcc-toolchain=/Users/legency/Library/Android/sdk/ndk-bundle/toolchains/x86_64-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/legency/Library/Android/sdk/ndk-bundle/sysroot -DnativeDump_EXPORTS  -isystem /Users/legency/Library/Android/sdk/ndk-bundle/sysroot/usr/include/x86_64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security  -O0 -fno-limit-debug-info  -fPIC -MD -MT CMakeFiles/nativeDump.dir/src/main/cpp/inlineHook.c.o -MF CMakeFiles/nativeDump.dir/src/main/cpp/inlineHook.c.o.d -o CMakeFiles/nativeDump.dir/src/main/cpp/inlineHook.c.o   -c /Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/inlineHook.c
In file included from /Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/inlineHook.c:19:
/Users/legency/Library/Android/sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi/asm/ptrace.h:21:10: fatal error: 'asm/hwcap.h' file not found
#include <asm/hwcap.h>
         ^~~~~~~~~~~~~
1 error generated.
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/dlopen.c:126:55: warning: cast to 'void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
        return STUBS.quick_on_stack_replace(filename, (void *)flag,
                                                      ^
1 warning generated.
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:239:25: warning: operator '<<' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
                        value = ALIGN_PC(pc) + (instruction & 0xFF) << 2;
                                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ ~~
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:239:25: note: place parentheses around the '+' expression to silence this warning
                        value = ALIGN_PC(pc) + (instruction & 0xFF) << 2;
                                ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:243:13: warning: cast to 'uint32_t *' (aka 'unsigned int *') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
                        value = ((uint32_t *) (ALIGN_PC(pc) + ((instruction & 0xFF) << 2)))[0];
                                 ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:371:12: warning: cast to 'uint32_t *' (aka 'unsigned int *') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
                                addr = (uint32_t *) (ALIGN_PC(pc) + imm32);
                                       ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:374:12: warning: cast to 'uint32_t *' (aka 'unsigned int *') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
                                addr = (uint32_t *) (ALIGN_PC(pc) - imm32);
                                       ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:579:16: warning: cast to 'uint32_t *' (aka 'unsigned int *') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
                                                value = ((uint32_t *) (pc + imm32))[0];
                                                         ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:582:16: warning: cast to 'uint32_t *' (aka 'unsigned int *') from smaller integer type 'unsigned int' [-Wint-to-pointer-cast]
                                                value = ((uint32_t *) (pc - imm32))[0];
                                                         ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:606:18: warning: & has lower precedence than ==; == will be evaluated first [-Wparentheses]
        if (target_addr & 1 == 1) {
                        ^~~~~~~~
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:606:18: note: place parentheses around the '==' expression to silence this warning
        if (target_addr & 1 == 1) {
                        ^
                          (     )
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/relocate.c:606:18: note: place parentheses around the & expression to evaluate it first
        if (target_addr & 1 == 1) {
                        ^
            (              )
7 warnings generated.
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:47:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
            return "_ZN3art7DexFile10OpenCommonEPKhmRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEjPKNS_10OatDexFileEbbPS9_PNS0_12VerifyResultE";
                   ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:50:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
            return "_ZN3art7DexFile10OpenMemoryEPKhmRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEjPNS_6MemMapEPKNS_10OatDexFileEPS9_";
                   ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:54:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
            return "_ZN3art7DexFile10OpenCommonEPKhjRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEjPKNS_10OatDexFileEbbPS9_PNS0_12VerifyResultE";
                   ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:58:20: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
            return "_ZN3art7DexFile10OpenMemoryEPKhjRKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEjPNS_6MemMapEPKNS_10OatDexFileEPS9_";
                   ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:62:12: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
    return "";
           ^
/Users/legency/StudioProjects/personal/dumpDex/app/src/main/cpp/util/deviceutils.cpp:76:65: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
        __android_log_print(ANDROID_LOG_ERROR, TAG, "size =%u", size);
                                                           ~~   ^~~~
                                                           %zu
6 warnings generated.
ninja: build stopped: subcommand failed.
ray0807 commented 6 years ago

编译不通过 同样的问题

BadDeveloper2022 commented 6 years ago

编译不通过 同样的问题 NDK 版本 最新17.04...

BadDeveloper2022 commented 6 years ago

Windows 系统