GAPID supports capturing from both Android devices and Windows/Linux desktop machines. On Android devices, GAPID supports tracing all OpenGL ES and Vulkan calls made by either a pure Java, native or hybrid application. On Windows/Linux desktop machines, GAPID supports tracing Vulkan calls.

Dependencies and prerequisites

Android

  • A device running Android Lollipop 5.0 (or more recent).
  • Either a debuggable application, or a device running a ‘rooted’ user-debug build.
  • Android SDK installed on the host machine.
  • Android hardware device connected through USB.
  • The device must have USB debugging enabled and the host machine must be authorized for debugging.
  • We recommend to set the “Stay awake” developer option to prevent issues that arise when the device screen sleeps.
  • Make sure to stop any program that may interact with the device over ADB, such as Android Studio, while using GAPID.

Windows/Linux

  • A Vulkan application compiled with x86-64. 32-bit applications are NOT currently supported.

Taking a capture

Click the Capture Trace... text in the welcome screen, or click the FileCapture Trace toolbar item to open the trace dialog.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. From the Device drop-down, select the device to trace.

  2. From the API drop-down, select the graphics API you want to trace.

  3. Using the ... button, select the Android Activity or browse the application that you want to trace.

  4. Add any command-line Arguments that are necessary for your program.

  5. Select the Working Directory for your program, only valid for tracing on Windows/Linux machines.

  6. Set the Environment Variables for tracing your program, only valid for tracing on Windows/Linux machines.

  7. If you wish to automatically stop tracing after N frames, then use a non-zero number for Stop After.

  8. If you wish to start tracing as soon as the application is launched, enable the Trace From Beginning option. If this option is NOT set, then in the tracing dialog, you must press Start to start the capture. Tracing OpenGL ES calls at the middle of the execution of an Android Activity (not from the beginning of the application by disabling this option) is currently an experimental feature.

  9. Disable Buffering disables the bufferring of the capture data on the tracing device which will slow down the tracing process. But in case of a crash, more the most recent data will be provided.

  10. If you would like to erase the package cache before taking the trace, enable the Clear package cache option.

  11. Hide Unknown Extensions hides the Vulkan extensions not supported by GAPID to the application when tracing Vulkan calls. For GLES calls, it does not do anything. GAPID always hide unknown extensions when tracing OpenGL ES calls.

  12. If tracing an OpenGL ES application you likely want to keep the Disable pre-compiled shaders option enabled. This option fakes no driver support for pre-compiled shaders for OpenGL ES, usually forcing the application to use glShaderSource(). GAPID is currently unable to replay captures that uses pre-compiled shaders when tracing for OpenGL ES. This option is invalid when tracing Vulkan Calls.

  13. Select an output directory

  14. Select an output file name.

Click OK to begin the trace.

Known issues

Please close any running instances of Android Studio before attempting to take a trace on Android devices. #911