[FEATURE]: NDK support (for arm and aarch64)
I got a working NDK on termux with arm support (2016 version), there's a version for aarch64 too but I haven't tested.
ndk for arm devices ndk for aarch64 devices
For this to work on android some environment variables must be set first, setup for arm NDK:
PATH=$PATH:~/android-ndk
export NDK_KNOWN_ABIS="armeabi-v7a armeabi-v7a-hard armeabi x86"
export NDK_KNOWN_ARCHS="arm x86"
export HOST_ARCH="arm"
#For android 5+ you need to set "true" export APP_PIE_REQUIRED=false
After that, we must create a chroot under /data/data/com.your.androidide/rootfs (otherwise some binaries, like arm-linux-androideabi-ld will lead to a bad system call), this chroot directory must have all essential directories into it (like /bin , /usr, /tmp etc) this is important because some NDK binaries try to run other binaries on /bin for example (or try to make tmp files under /tmp) without chroot these binaries will access the Android itself file system instead of your Linux file system.
There are two ways of making a chroot on Android (with root and without root). The simplest and fastest way is using the chroot command wich requires root, or you can try the without root method using the PRoot
Do you mean I should "manually" use this? Does it work
Does aide attempt to stop gradle for downloading the ndk?
I've had the experience in Linux that I eventually had ten ndk directories ten gig each. Apparently gradle and/or apps try to download a certain ndk that's specified in gradle files
EVEN IN DEBIAN ARM THIS IS STILL A DISASTER. \0/ Google what are you doing
@MrIkso has provided instructions on how to install and use NDK in AndroidIDE. The instructions are available here.
Do you mean I should "manually" use this? Does it work.
It works.
Does aide attempt to stop gradle for downloading the ndk?
No. I don't know if that is even possible.
Maybe this should work as aapt2fromMavenOverride. For example call this NdkFromGradleOverride, as the downloaded ndk from developers.android.com or where Gradle downloads it from, doesn't contain folder linux-aarch64 or linux-armeabi for needed ARM arch, only linux-x86_64 in the llvm toolchains.