Setting up C++ IDE project for AOSP development (no NDK)

Viewed 395

I need to customize a Android ROM by building it from AOSP (for an embedded platform). I managed to create and compile a simple C++ "hello world" software, but now I want to use Eclipse to go further on the development (the software does NOT use NDK, it is a completely native software which manages IO ports). I suppose that I have to create a CMake file which points to the target ARCH (iMX8) and the CROSS_COMPILE (aarch64-linux-android-) right? But how can I point to the SYS_ROOT (if I have to). Can someone explain to me ho wdo I set up this kind of project for the Eclipse IDE? I have the AOSP built folder available.

1 Answers

For just browsing the code, here's the idegen guide on how to do that for either IntelliJ or Eclipse:
https://android.googlesource.com/platform/development/+/master/tools/idegen/README

For building it, you'll have to create a new module, like in external/ or vendor/, and create an approriate makefile ( .mk or .bp ).
See external/tinyalsa for an example:
https://android.googlesource.com/platform/external/tinyalsa/+/refs/heads/master/Android.bp
That build file for example sets up rules to build a shared library and some binaries that use it.

To then build it you could mmm external/tinyalsa . See this blog for some more info in regards to this.

Related