Testing OpenGl Graphics on Android Emulator/Device

Andrew Azz 171 Reputation points
2022-05-23T09:28:47.17+00:00

Hi,

This seems impossible.

adb shell dumpsys gfxinfo

Only collects around 2 frames.

The Android Device Monitor's systrace appears to collect frame data, but always shows no janky frames, which is obviously incorrect given the jerky movement on screen.

I think the above two profilers do not do well with OpenGl, or else I'm not using them correctly.

The Android Device Monitor's OpenGL trace fails to start, both on emulator and device (Samsung Galaxy S9+).

As I said - impossible?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,357 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 43,371 Reputation points Microsoft Vendor
    2022-05-24T01:52:45.383+00:00

    Hello,

    ADB commands and ADB Shell commands work on all Android devices regardless of the device model or manufacturer.

    Before testing, have you done the following things?

    1. Enable USB Debugging in Developer Options.
    2. Download Android SDK Platform Tools (ADB & Fastboot).
    3. Authorize ADB Commands on Android.

    In my testing, the framerate data is updated only when the screen is changed.

    For example, if you have a list, and you don't scroll it, you will only see limited framerate data.

    The framestats information and frame time-consuming information are usually collected every 2s (120 frames at a time, 16ms per frame, which takes about 2s). In order to precisely control the time window, for example, to limit the data to a specific animation, you can reset all counters and re-collect the data.

    adb shell dumpsys gfxinfo < PACKAGE_NAME > reset

    The same applies to data that needs to be captured less than 2s.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.