2.3.3 Preparing to capture non-debuggable applications

To capture non-debuggable applications, you must install a Vulkan or OpenGL ES layer driver and manually install and configure aga-daemon to collate information from different captured applications. Then use the Device Manager to connect to your device.

Prerequisites

Procedure

  1. Install the layer driver appropriate to the API you are using:
    • To capture Vulkan applications using the Vulkan API layers system, you must install the interceptor as a global Vulkan layer on your device:
      1. Copy libVK_layer_aga.so onto the device:
        • For 32-bit interceptor:

          adb push target/android/arm/libVK_layer_aga.so /data/local/tmp
          adb shell chmod 777 /data/local/tmp/libVK_layer_aga.so
        • For 64-bit interceptor:

          adb push target/android/arm64/libVK_layer_aga.so /data/local/tmp
          adb shell chmod 777 /data/local/tmp/libVK_layer_aga.so
      2. Open a shell on your target device as the super user by running:
        adb shell
        su

        or

        adb root
        adb shell
      3. Copy libVK_layer_aga.so into the app folder and rename it:
        cp -f /data/local/tmp/libVK_layer_aga.so \
          /data/user/<user_id>/<package_name>/libVkLayerAGA.so
      4. Enable layers from the host machine:
        adb shell settings put global enable_gpu_debug_layers 1
        adb shell settings put global gpu_debug_app <package_name>
        adb shell settings put global gpu_debug_layers VK_LAYER_ARM_AGA

      See Install Vulkan validation layers on Android for more information.

    • To capture OpenGL ES applications, you must install the interceptor as a global OpenGL ES layer on your device:
      1. Copy libGLES_layer_aga.so onto the device then into the app folder:
        adb push libGLES_layer_aga.so /data/local/tmp
        adb shell chmod 777 /data/local/tmp/libGLES_layer_aga.so
        adb shell cp /data/local/tmp/libGLES_layer_aga.so /data/user/<user_id>/<package_name>
      2. Enable layers:
        adb shell settings put global enable_gpu_debug_layers 1
        adb shell settings put global gpu_debug_app <package_name>
        adb shell settings put global gpu_debug_layers_gles  libGLES_layer_aga.so
      See Install OpenGL ES layers on Android for more information.
  2. Open a shell on your host machine.
  3. Navigate to the Graphics Analyzer installation directory.
  4. Copy the daemon to your target device:
    • For 32-bit daemon:

      adb push target/android/arm/aga-daemon /data/local/tmp
    • For 64-bit daemon:

      adb push target/android/arm64/aga-daemon /data/local/tmp
  5. Open a shell on your target device as the super user by running:
    adb shell
    su
  6. Install the daemon on the device, and grant appropriate permissions:
    cp /data/local/tmp/aga-daemon /system/bin
    chmod 777 /system/bin/aga-daemon
  7. Enter the following commands on the host machine:
    adb forward tcp:5002 tcp:5002
    adb shell aga-daemon

Next Steps

Open Graphics Analyzer and the Device Manager, then open the Linux/IP tab to connect to the default IP address 127.0.0.1 and port 5002. See 3.2 Capture over adb for Android devices for more information.
Non-Confidential - RELPDF file icon PDF version101545__00_en
Copyright © 2020–2022, 2024 Arm Limited or its affiliates. All rights reserved.