Git Product home page Git Product logo

Comments (6)

mustime avatar mustime commented on August 18, 2024

From the file lists:

1>main.cc 1>selinux.cc 1>sdk_code.cc 1>elf_dlfcn.cc 1>file_utils.cc 1>ptrace_wrapper.cc 1>call_procedure.cc 1>call_procedure-x86.cc

And the build hint:

Configuration: Debug x64

You might have compiled call_procedure-x86.cc instead of call_procedure-x64.cc on x64 platform.

from adrill.

mrkio9 avatar mrkio9 commented on August 18, 2024

From the file lists:

1>main.cc 1>selinux.cc 1>sdk_code.cc 1>elf_dlfcn.cc 1>file_utils.cc 1>ptrace_wrapper.cc 1>call_procedure.cc 1>call_procedure-x86.cc

And the build hint:

Configuration: Debug x64

You might have compiled call_procedure-x86.cc instead of call_procedure-x64.cc on x64 platform.

i tried but its not impossible
`F:\Adrill-main\Adrill-main>F:\Adrill-main\Adrill-main\build.bat

F:\Adrill-main\Adrill-main>cmake -S . -B build -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_ARCH_ABI=x86 -DCMAKE_ANDROID_NDK=F:/SDK/ndk/22.0.7026061
-- Building for: Visual Studio 16 2019
-- Android: Targeting API '21' with architecture 'x86', ABI 'x86', and processor 'i686'
-- Android: Selected unified Clang toolchain
-- The C compiler identification is Clang 5.0.300080
-- The CXX compiler identification is Clang 5.0.300080
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: F:/SDK/ndk/22.0.7026061/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: F:/SDK/ndk/22.0.7026061/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (4.7s)
-- Generating done (0.0s)
CMake Warning:
You are using Visual Studio tools for Android, which does not support
standalone executables. However, the following executable targets do not
have the ANDROID_GUI property set, and thus will not be built as expected.
They will be built as shared libraries with executable filenames:

adrill

-- Build files have been written to: F:/Adrill-main/Adrill-main/build

F:\Adrill-main\Adrill-main>cmake --build build --parallel 8 --target adrill
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

ANDROID_HOME=F:\Microsoft\AndroidSDK\25
ANT_HOME=D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Apps\apache-ant-1.9.3
JAVA_HOME=C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot
NDK_ROOT=F:\Microsoft\AndroidNDK64\android-ndk-r16b
1>Checking Build System
ANDROID_HOME=F:\Microsoft\AndroidSDK\25
ANT_HOME=D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Apps\apache-ant-1.9.3
JAVA_HOME=C:\Program Files\Eclipse Foundation\jdk-8.0.302.8-hotspot
NDK_ROOT=F:\Microsoft\AndroidNDK64\android-ndk-r16b
1>Building Custom Rule F:/Adrill-main/Adrill-main/CMakeLists.txt
main.cc
selinux.cc
sdk_code.cc
elf_dlfcn.cc
file_utils.cc
ptrace_wrapper.cc
call_procedure.cc
call_procedure-x86.cc
clang.exe: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument]
clang.exe: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument]
undefined reference to 'CallProcedure::returnValue()'
undefined reference to 'CallProcedure::returnValue()'
undefined reference to 'CallProcedure::returnValue()'
undefined reference to 'CallProcedure::returnValue()'
undefined reference to 'CallProcedure::_setupCall(unsigned long, std::__ndk1::vector<long, std::__ndk1::allocator > const&)'
undefined reference to 'CallProcedure::_checkCall()'
undefined reference to 'strtof_l'
undefined reference to 'strtod_l'
clang.exe: error: linker command failed with exit code 1 (use -v to see invocation)
D:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Application Type\Android\3.0\A
ndroid.Common.targets(119,5): error MSB6006: "clang.exe" exited with code 1. [F:\Adrill-main\Adrill-main\build\adrill.v
cxproj]`

from adrill.

mrkio9 avatar mrkio9 commented on August 18, 2024

From the file lists:

1>main.cc 1>selinux.cc 1>sdk_code.cc 1>elf_dlfcn.cc 1>file_utils.cc 1>ptrace_wrapper.cc 1>call_procedure.cc 1>call_procedure-x86.cc

And the build hint:

Configuration: Debug x64

You might have compiled call_procedure-x86.cc instead of call_procedure-x64.cc on x64 platform.

I build it by add 3 lines in all file in backend
bool CallProcedure::_setupCall(uintptr_t remoteAddr, const std::vector<intptr_t>& args){}
intptr_t CallProcedure::returnValue() {}
bool CallProcedure::_checkCall() {}

but after build that, it has error again. and now, i cannt understand how to fix it ? too hard to build adrill but i loved it
C:\Users\Admin>adb shell "su 0 /data/local/tmp/adrill -pname com.ketchapp.rider --libpath /data/local/tmp/libsoLib.so" /data/local/tmp/adrill: no closing quote <- how to fix it?

from adrill.

mustime avatar mustime commented on August 18, 2024

-- Check for working CXX compiler: F:/SDK/ndk/22.0.7026061/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe

The output above indicates the clang compiler is of arch x86_64. That won't gonna work on x86 compilation

from adrill.

mustime avatar mustime commented on August 18, 2024

See call_procedure-x86.cc limitation here:

It means the following code would not be compiled at all unless the compiler is arch x86. That's why you got the undefined references linking error.

I don't have Windows right now. But on my MacOS's NDK, the x86 version of NDK compiler should be ${NDK_ROOT}/toolchains/llvm/prebuilt/darwin-x86_64/bin/i686-linux-android21-clang++.

from adrill.

mustime avatar mustime commented on August 18, 2024

From the file lists:

1>main.cc 1>selinux.cc 1>sdk_code.cc 1>elf_dlfcn.cc 1>file_utils.cc 1>ptrace_wrapper.cc 1>call_procedure.cc 1>call_procedure-x86.cc

And the build hint:

Configuration: Debug x64

You might have compiled call_procedure-x86.cc instead of call_procedure-x64.cc on x64 platform.

I build it by add 3 lines in all file in backend bool CallProcedure::_setupCall(uintptr_t remoteAddr, const std::vector<intptr_t>& args){} intptr_t CallProcedure::returnValue() {} bool CallProcedure::_checkCall() {}

but after build that, it has error again. and now, i cannt understand how to fix it ? too hard to build adrill but i loved it C:\Users\Admin>adb shell "su 0 /data/local/tmp/adrill -pname com.ketchapp.rider --libpath /data/local/tmp/libsoLib.so" /data/local/tmp/adrill: no closing quote <- how to fix it?

And for the no closing quote error, try command like this:

adb shell "su -c '/data/local/tmp/adrill --pname com.ketchapp.rider --libpath /data/local/tmp/libsoLib.so'"

from adrill.

Related Issues (9)

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.