Capture a trace
Connect to your device and start the capture in Graphics Analyzer.
- In a terminal, navigate to the Arm Mobile Studio installation directory, where you will find a Python script, named
aga_me.pywhich helps Graphics Analyzer capture data from your device:
- Run the
aga_me.pyscript, giving the Android package name of the application you want to profile:
Tip: If you don't know the package name, run the script with the
‑‑list_packagesoption first, to see a list of the debuggable packages installed on the device:
python3 aga_me.py --list_packages
For OpenGL ES applications, run the script with:
python3 aga_me.py com.MyCompany.MyApp
For Vulkan applications, use the
-voption to instruct the script to install the Vulkan layer. Refer to the Android documentation for more details.
python3 aga_me.py -v com.MyCompany.MyApp
- Select Open the Device Manager from the Debug menu. If your device is connected successfully it will be listed in the Android Devices window. However, don't use the button here to make the connection, as this may not work for some Android versions. Instead, use the Connect to an IP fields at the bottom of the dialog.
- Specify an IP Address of 127.0.0.1
- Specify the Port number 5002
- Click Connect.
- Optionally, select Trace Config and select which API assets are captured. Only enable the asset types you need. The more asset types you enable, the slower the application will run, the more memory is required, and the generated trace file will be larger.
- In the terminal, press Enter to continue the script. The script will launch your application on the device and start capturing the trace. Graphics Analyzer begins displaying the trace data as it receives it from the target.
- Perform your test scenario on the device.
- To stop tracing, press Enter in the terminal to continue the script. The script will stop the trace, remove the Graphics Analyzer daemon from your device, and terminate. Graphics Analyzer will report a warning that connection to your device has been interrupted. You can safely ignore this warning.
- Save or export the trace file, using options under the File menu.
- Analyze your trace in Graphics Analyzer. See the Graphics Analyzer user guide for information about how to explore your application.
The script connects to your device and configures it so that Graphics Analyzer can collect data. The script returns instructions to the terminal about the next required steps, and waits for you to complete them before starting the trace.