legecy C/C++ application build to NDK and use as android APK?

23 views
Skip to first unread message

Jiang Peng

unread,
Nov 14, 2025, 8:13:19 AM (yesterday) Nov 14
to android-ndk
Hello everyone,
I am new to Android/NDK development, and seeking for some advice of my project.
This project is to port a large legacy C/C++ program into android. Currently this program is built in yocto, and it is multiple threads and multiple process. Currently compile as C++ 11 and run as a Linux application.

In this program, it basically read some configure and send some UDP packages. It does not access other hardwares.

For this type of program, may I know if possible to build in NDK and of course some modifications to expose JNI to java etc to init and run?

Eventually needs wrap this C/C++ programs to a APK file and run in Android.

If possible, may I know what is the general guideline to do that?
If not possible, may I know what is the major problems.
thanks a lot

John Dallman

unread,
Nov 14, 2025, 9:12:52 AM (yesterday) Nov 14
to andro...@googlegroups.com
This is certainly possible in principle. The problems will be in the details, so explaining a bit more will make it easier for people to help you.  

What sort of Linux program is this? Does it have a command-line user interface, a GUI, or something else? 

Does it need root privileges on Linux?

How is it structured: one big executable, an executable plus shared libraries, or something else?    

You say it sends UDP packages: what sort of APIs does it use for that? Have you checked if those are available to native code on Android? Is sending those packages over cellular connectivity or Wi-Fi going to be useful and effective? 

How is it currently tested? 

John


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/android-ndk/cc5415f9-568b-4f67-8759-806ef7fe7b9dn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages