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.
Asked
Active
Viewed 3,057 times
1 Answers
8
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.

Alex P.
- 30,437
- 17
- 118
- 169
-
Thanks a lot @alex-p. – vepzfe Feb 27 '17 at 18:54
-
1Do you know how to enable "debug GPU overdraw" via adb too? I'm talking about this: https://developer.android.com/studio/images/profile/gpu/gpu-overdraw-before_2x.png . I've found that in order to enable it, I can use "./adb shell setprop debug.hwui.overdraw show` , but how can I hide it? – android developer May 10 '18 at 13:50