Description

This is a distribution of the CrystaX NDK, which has been developed as a drop-in replacement for Google's Android NDK (Native Development Kit). Compared to Google's NDK, the CrystaX NDK provides the same functionality as well as several great features and tons of fixes and improvements.

The main goal of the CrystaX NDK is to allow Android developers to produce standard conformant code and thus make Android native development more efficient. The CrystaX NDK dramatically decreases development time allowing usage of standard code working on multiple platforms (iOS, OS X, Windows, Linux, etc.) instead of distracting developers with Android's peculiarities and forcing coders to try to workaround them (or even write separate Android-specific implementations of functionality already implemented for another platform if a detected problem cannot be easily worked around).

Unfortunately, Android libc (Bionic) has very limited functionality (which differs from one Android version to another), so developers have been forced to take into account all its peculiarities, detecting in run-time which specific Android version the application is running on and applying specific workarounds. With CrystaX NDK, developers can forget about such problems, since CrystaX NDK provides complementary libcrystax, which is used to hide such differences between Android versions or even re-implement many of libc functions. Most importantly, with the help of libcrystax, the application behaves the same on all Android devices regardless of Android version.

Another goal of CrystaX NDK is to make some great features available for the Android native world. For example, support of Objective-C and another programming languages.

This project was initially started as a personal project of Dmitry Moskalchuk with the intention to just add missing C++ support (C++ exceptions, RTTI, and the Standard C++ Library) to the Google's Android NDK, but with time, many additional needs were discovered, and it turned out that improving the CrystaX NDK step-by-step was in fact the best way to force an evolution of native Android development. Since its beginning in 2009, numerous open-source and commercial projects have used the CrystaX NDK for porting and development for Android with minimal effort.

Nowadays, CrystaX NDK offers numerous great features, making native development for Android easier. See below the key features of the CrystaX NDK.

Features

License

The content of the CrystaX NDK is covered by various open-source licenses. See the copyright disclaimers in each respective file for details.

Note that the CrystaX NDK release packages also contain prebuilt binaries for the compiler, linker, archiver, etc. The source codes for the toolchains are available at GitHub (you can use the build script to download it automatically).

The prebuilt GCC and companion binaries (GDB, binutils etc) are covered by either the GNU General Public License (GPL) or the GNU Lesser General Public License (LGPL). For details, see the files COPYING and COPYING.LIB under $NDK/toolchains/$tc/prebuilt/$system.

The prebuilt LLVM/Clang toolchains are covered by the LLVM "BSD" license.

Basically, licensing rules are the same as for Google's Android NDK - i.e., both commercial and non-commercial usage allowed. The only additions are regarding CrystaX parts, which are covered by a permissive BSD 2-clause license.

CrystaX NDK contains code from libc library of FreeBSD project which by-turn contains code from other projects. Also, several another open-source projects used, such as GNU gcc, GNU binutils, LLVM clang, LLVM libc++ etc. To see specific authors and/or licenses, look into appropriate source file. Here is license for those parts which are not derived from any other projects but written by CrystaX. Copyright (c) 2011-2020 CrystaX. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY CrystaX ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CrystaX OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of CrystaX.

Feedback

We're working hard on making CrystaX NDK as good as possible. However, there is no guarantee it's bug-free - as everything in this world. So if you find a bug, please report it to us and we'll do our best to fix it.

Also, you can use the public discussion group to ask about CrystaX NDK (for example, if you're unsure if something is a bug or feature). You can post a question via the web interface or use it as a good old mailing list: send e-mail to crystax-ndk@googlegroups.com. This is a pre-moderated group, so don't worry if you don't see your post immediately; give us some time to see and approve it.

Finally, you can directly contact us if the above options don't fit your needs.

Download

How to build

You can also build the distribution from sources if you don't want to use the prebuilt versions for some reason. Follow the instructions below.

Setting up the build environment:

Follow the instructions from the AOSP site (except the Java part):

For Linux host.

For OS X host.

WARNING!!! Building the Windows version of CrystaX NDK is only supported on a Linux host (cross-build used). Building on a Windows host is not tested and not supported.

Building NDK

Download the build script and run it.

Example: \curl -sSL https://www.crystax.net/download/ndk-crystax-r10-build.sh | /bin/bash It will take a long time - up to many hours. When the script is finished, it will print the directory containing the package with the NDK release.

Example: It will take a long time - up to many hours. When the script is finished, it will print the directory containing the package with the NDK release. You're done! Use this package as a drop-in replacement for Google's NDK!