3.1.1. Building and running an Android NDK sample

To use a terminal to build and deploy an Android NDK sample from Microsoft Windows or x86 Linux:

  1. Ensure your path contains the Android NDK as described in Chapter 2 Installing the Mali OpenGL ES 2.0 SDK for Android.

  2. Open a command prompt.

  3. Change to the Mali SDK root directory.

  4. Run the script to build the sample:

    • To build all of the Android NDK samples, run:

      bash build-android-ndk.sh 
      
    • To build a single sample named sample_name, run:

      bash build-android-ndk.sh sample_name 
      
  5. Run the script to deploy the sample to a connected Android device:

    • To deploy all of the Android NDK samples, run:

      bash deploy-android-ndk.sh 
      
    • To deploy a single sample named sample_name, run:

      bash deploy-android-ndk.sh sample_name 
      
  6. Go to the Android menu screen on the device and run the sample.

Copyright © 2011 ARM. All rights reserved.ARM DUI 0587A
Non-ConfidentialID120411