1<html><body><pre>Android NDK x86 (a.k.a. IA-32) instruction set support 2------------------------------------------------------ 3 4Introduction: 5------------- 6 7Android NDK r6 added support for the 'x86' ABI, that allows native code to 8run on Android-based devices running on CPUs supporting the IA-32 instruction 9set. 10 11The Android x86 ABI itself is fully specified in docs/CPU-ARCH-ABIS.html. 12 13Overview: 14--------- 15 16Generating x86 machine code is simple: just add 'x86' to your APP_ABI 17definition in your Application.mk file, for example: 18 19 APP_ABI := armeabi armeabi-v7a x86 20 21Alternatively, since NDK r7, you can use: 22 23 APP_ABI := all 24 25will generate machine code for all supported ABIs with this NDK. Doing so 26will ensure that your application package contains libraries for all target 27ABIs. Note that this has an impact on package size, since each ABI will 28correspond to its own set of native libraries built from the same sources. 29 30The default ABI is still 'armeabi', if unspecified in your project. 31 32As you would expect, generated libraries will go into $PROJECT/libs/x86/, and 33will be embedded into your .apk under /lib/x86/. 34 35And just like other ABIs, the Android package manager will extract these 36libraries on a *compatible* x86-based device automatically at install time, 37to put them under <dataPath>/lib, where <dataPath> is the 38application's private data directory. 39 40Similarly, the Android Market server is capable of filtering applications 41based on the native libraries they embed and your device's target CPU. 42 43Debugging with ndk-gdb should work exactly as described under docs/NDK-GDB.html. 44 45Standalone-toolchain: 46--------------------- 47 48It is possible to use the x86 toolchain with NDK r6 in stand-alone mode. 49See docs/STANDALONE-TOOLCHAIN.html for more details. Briefly speaking, 50it is now possible to run: 51 52 $NDK/build/tools/make-standalone-toolchain.sh --arch=x86 --install-dir=<path> 53 54The toolchain binaries have the i686-linux-android- prefix. 55 56 57Compatibility: 58-------------- 59 60The minimal native API level provided by official Android x86 platform builds 61is 9, which corresponds to all the native APIs provided by Android 2.3, i.e. 62Gingerbread (note also that no new native APIs were introduced by Honeycomb). 63 64You won't have to change anything to your project files if you target an older 65API level: the NDK build script will automatically select the right set of 66native platform headers/libraries for you. 67 68Note that, as of today (June 2011), *no* compatible x86 devices exist on the 69market. 70 71In particular, while there are various projects which have forked the 72official Android open-source tree and added their own x86-specific 73customizations, there is absolutely no guarantee that anything generated 74with the official Android NDK is going to run on them at the moment. 75</pre></body></html> 76