编译C code(netcat的),以原生的Andr​​oid可执行可执行、netcat、code、oid

2023-09-04 10:03:05 作者:待我强大给我媳妇儿一天下

我在写一个使用Netcat的服务帧缓冲区通过网络连接的bash脚本,但首先我需要将其编译为本地可执行文件。我甚至得到这个脚本工作Ubuntu的机器,其中netcat的默认安装的。

I'm writing a bash script that uses Netcat to serve framebuffer over network connection, but first I need to compile it to native executable. I even got this script to work on a Ubuntu machine, where netcat is installed by default.

我发现这个 https://github.com/android/platform_external_netcat 但在NDK没有经验在所有。这显然​​不使用JNI或Java的一切都是那么默认的态度制作的Andr​​oid应用程序将不会给我任何地方。

I found this https://github.com/android/platform_external_netcat but have no experience in NDK at all. This obviously doesn't use JNI or Java at all so default approach for making Android applications won't get me anywhere.

所以,问题是。如何从这个来源$ C ​​$ C得到一个可执行文件?

So the question is. How do I get an executable file from this source code?

推荐答案

在看文档下在Android SDK / STANDALONE-TOOLCHAIN​​.html它描述了如何使用NDK因为它可以产生手臂二进制文件独立编译器。

Look in the Android sdk under docs/STANDALONE-TOOLCHAIN.html it describes how to use the ndk as standalone compiler which can produce arm binaries.