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