Quick: Media CTS

How to run Media Compatibility Test Suite

CTS stands for Compatibility Test suite and is a tool normally distributed to vendors of Android devices.

The CTS media tests can help benchmark your device to help you adjust the expected framerates, e.g. for video recording for a given codec.

Media tests

Download CTS media files and push them to the device with the provided script.

Need to adjust CtsMediaTestCases.config to find your media files under path/to/android-cts-media or else it will complain about missing media files:

<configuration description="Config for CTS Media test cases">
    [...]
    <target_preparer class="com.android.compatibility.common.tradefed.targetprep.MediaPreparer">
        <option name="images-only" value="false" />
        <option name="local-media-path" value="/path/to/android-cts-media" />
        <option name="skip-media-download" value="true" />
    </target_preparer>
    [...]
</configuration>

To run media tests, use this command, the documentation on the source.android.com page is out of date:

run cts \
  --module CtsMediaTestCases \
  --test android.media.cts.MediaCodecCapabilitiesTest#testGetMaxSupportedInstances

Also make sure to save the results of get_achievable_rates for later.

Wrapping up

More general info about running CTS is available at the androidsource page.

Published by

Edit source on Github