2.6.5 Capture a native application

The following steps show the general method of capturing a native application:

  1. Run the following command:
    luna-send -n 1 -f luna://com.webos.service.applicationManager/listApps "{}"
    Note the following information relating to the captured application:
    folderPath
    The home directory of the application
    main
    The main executable of the application. The following steps change this executable so that the application loads the Graphics Analyzer interceptor.
  2. Move into the home directory of the application.
  3. Make a subdirectory named ga. Hard link /opt/graphics_analyzer/libinterceptor.so into this subdirectory. Do not use soft links because some native apps execute in a chroot jail and cannot see /opt/graphics_analyzer while running. As an alternative, copy libinterceptor.so into this subdirectory.
  4. Add an extension .bin to the main executable of the application.
  5. Hard link /opt/graphics_analyzer/aga-wrapper into the home directory of the application, giving aga-wrapper the same name that the main executable originally had. Alternatively, use a copy rather than a hard link.
  6. Open the Graphics Analyzer host GUI application on your workstation.
  7. Connect to the device using the Graphics Analyzer Device Manager.
  8. Start the application that you want to capture in the usual way.
  9. The function calls are captured in the Graphics Analyzer Host GUI application.

Tip:

To temporarily disable the capture, rename the hard link to libinterceptor.so, for example to libinterceptor.so.removed. Note that this renaming affects other native applications in the same directory.

Example 2-1 webOS main menu (com.webos.app.home)

This application draws the main system menu bar. The main executable of this application is /usr/bin/com.webos.app.home. To capture this application, use the following commands:

mkdir -p /usr/bin/ga
ln /opt/graphics_analyzer/libinterceptor.so /usr/bin/ga
mv /usr/bin/com.webos.app.home /usr/bin/com.webos.app.home.bin
ln /opt/graphics_analyzer/aga-wrapper /usr/bin/com.webos.app.home

After the host GUI has started and is connected to the webOS device, launch the main menu and see the function calls being captured. To temporarily disable the capture, use this command:

mv /usr/bin/ga/libinterceptor.so /usr/bin/ga/libinterceptor.so.removed
Non-Confidential - RELPDF file icon PDF version101545__00_en
Copyright © 2020–2022, 2024 Arm Limited or its affiliates. All rights reserved.