Prepare your application

To enable Graphics Analyzer to perform a trace, you need to add the Arm interceptor library to your application. The interceptor library collects information about the OpenGL ES and EGL function calls made by the application.

If you're using Unity or Unreal Engine to build your application, follow the instructions here instead:

  1. Specify the location of the interceptor library,, in the module’s build.gradle file by adding the following line to the SourceSet main:
     jniLibs.srcDirs += ['<install_dir>/graphics_analyzer/target/android/arm/unrooted/']
    Note: Specify the unrooted directory, not the subdirectory that contains the library.
  2. Ensure that the abiFilters property in the module’s build.gradle file is set to a value that the interceptor supports; either armeabi-v7a, arm64-v8a, or both. For example, to support both Armv7 and Armv8 targets, specify:
    android {
             defaultConfig {
                   ndk {
                        abiFilters 'armeabi-v7a', 'arm64-v8a'
  3. Enable the interceptor by adding a Java component to the application to be traced to enable it to load the interceptor library. The details of this step depend on the type of application.

    For applications that use C or C++ only:
    1. Create a new Activity class that extends
    2. Reference this new Activity in your AndroidManifest.xml as the android:name attribute of the activity element.
    3. Ensure that the android:hasCode attribute of the application element is set to true, otherwise the Java file will not be included in the APK.
    For applications that use Java, C/C++, or both, add the following code to the beginning of the project's main Activity class:
          catch (UnsatisfiedLinkError e)
          {            // Feel free to remove this log message.
               Log.e("[GA]", "GA not loaded: " + e.getMessage());
               Log.d("[GA]", Log.getStackTraceString(e));
    Note: For more information about this step, see the Target installation section of the Graphics Analyzer User Guide.
  4. Recompile the application and install it on the target device.
Previous Next