No "---PROFILEDATA---" is being generated by the "adb shell dumpsys gfxinfo <package name> framestats" command."

Hi,
I encountered an issue while testing to apply Baseline Profiles to Android app developed with Unity.

The problem arises when using Macrobenchmark tool, which uses the startActivityAndWait function mainly. This function relies on the "adb shell dumpsys gfxinfo <package name> framestats" command to determine when the app has finished loading. It specifically looks for the ---PROFILEDATA--- section in the command’s output and compares frame times to detect completion.

Unfortunately, an Android app built with Unity does not generate this information when I use the aforementioned command. It fails to include the expected data, similar to the example below, which should normally be part of the output:

--PROFILEDATA--
Flags,FrameTimelineVsyncId,IntendedVsync,Vsync,InputEventId,HandleInputStart,AnimationStart,PerformTraversalsStart,DrawStart,FrameDeadline,FrameInterval,FrameStartTime,SyncQueued,SyncStart,IssueDrawCommandsStart,SwapBuffers,FrameCompleted,DequeueBufferDuration,QueueBufferDuration,GpuCompleted,SwapBuffersCompleted,DisplayPresentTime,CommandSubmissionCompleted,
1,4360036,13794951239804,13794984573136,0,13794998012576,13794998012992,13794998123867,13795008936534,13794967906470,13794998009784,16666666,13795010051242,13795010154326,13795010405201,13795029919742,13795034766367,648833,425792,13795034766367,13795032345951,0,13795029919742,
--PROFILEDATA--

I tested the same "adb shell dumpsys gfxinfo <package name> framestats" command on other Android apps, and in all cases, they successfully printed the ---PROFILEDATA--- section to the console.

I suspect the issue arises from Unity’s reliance on OpenGL or Vulkan for rendering, which functions differently from Android’s native UI rendering. Hence, I tried using Android’s own native UI along with Unity’s, but the issue wasn’t fixed.

Is there a way or option to generate PROFILEDATA from a Unity-based Android application?

Thank you for taking the time to read this.

Tested this using Untiy 2022.3.20