nmeum / android-tools

Unoffical CMake-based build system for android command line utilities
Apache License 2.0
187 stars 54 forks source link

How to cross compile adb with ndk #161

Closed mengyanshou closed 1 week ago

mengyanshou commented 1 week ago

How to cross compile adb with ndk, any help, thanks!

Biswa96 commented 1 week ago

Are you trying to use adb in Android?

mengyanshou commented 1 week ago

I was able to successfully compile adb for linux in the arm64, but when I executed it in Android termux, only the Bad System Call was returned

this repo https://github.com/Magisk-Modules-Repo/adb-ndk can use static adb binary, but i want modify source code to compile new adb binary

Biswa96 commented 1 week ago

but when I executed it in Android termux, only the Bad System Call was returned

Try to find the system call in logcat output. termux uses many patches on top of this repository. Those patches can be found here https://github.com/termux/termux-packages/tree/master/packages/android-tools.

mengyanshou commented 1 week ago

I have also tried termux-package, I can not compile static adb, and it is not easy to modify the source code, I try logcat to see if I can get useful information, thanks!

mengyanshou commented 1 week ago

S41007-22174162_com termux i cannot get log from logcat

Biswa96 commented 1 week ago

There is no set_robust_list(2) call in android-tools repository including git submodules. It is probably coming from other dependencies.