Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show/hide Profile GPU rendering as bars using adb command?

I'm trying to automate some of the tasks which I do while development on a regular basis using scripts. One of which is switching on and off GPU Profile rendering. However, I can't find the adb command to show/hide it.

like image 824
vepzfe Avatar asked Nov 04 '25 23:11

vepzfe


1 Answers

The Profile GPU Rendering checkbox in the Developer Options controls value of the debug.hwui.profile system property:

/**
  * System property used to enable or disable hardware rendering profiling.
  * The default value of this property is assumed to be false.
  *
  * When profiling is enabled, the adb shell dumpsys gfxinfo command will
  * output extra information about the time taken to execute by the last
  * frames.
  *
  * Possible values:
  * "true", to enable profiling
  * "visual_bars", to enable profiling and visualize the results on screen
  * "false", to disable profiling
  *
  * @see #PROFILE_PROPERTY_VISUALIZE_BARS
  *
  * @hide
  */
public static final String PROFILE_PROPERTY = "debug.hwui.profile";

So you can use setprop debug.hwui.profile visual_bars command to enable profiling and setprop debug.hwui.profile false to disable it.

like image 86
Alex P. Avatar answered Nov 07 '25 12:11

Alex P.