List of supported A/V and Image Codecs Using ADB, is it possible to obtain a list of audio, video and image codecs supported on a given device? Whether or not they physically play is another story. I'm just trying to poke the device and get a list back so I can attempt to play whatever, say Nexus 5 supports. 

Thanks.
The file media_codecs.xml located in /system/etc lists the codecs available for a particular device.

To read it via adb shell:

adb shell cat /system/etc/media_codecs.xml


Part of Media_codecs.xml content on my phone:

&lt;MediaCodecs&gt;

    &lt;Settings&gt;
        &lt;Setting name="max-video-encoder-input-buffers" value="10" /&gt;
    &lt;/Settings&gt;

     &lt;Decoders&gt;
        &lt;!-- ffmpeg video decoders --&gt;
        &lt;MediaCodec name="OMX.ffmpeg.h263.decoder" type="video/3gpp"&gt;
            &lt;Limit name="size" min="16x16" max="1920x1088" /&gt;
            &lt;Limit name="alignment" value="2x2" /&gt;
            &lt;Feature name="adaptive-playback" /&gt;
        &lt;/MediaCodec&gt;

        &lt;MediaCodec name="OMX.ffmpeg.h264.decoder" type="video/avc"&gt;
            &lt;Limit name="size" min="16x16" max="2048x2048" /&gt;
            &lt;Limit name="alignment" value="720x1280" /&gt;
            &lt;Feature name="adaptive-playback" /&gt;
        &lt;/MediaCodec&gt;

        &lt;MediaCodec name="OMX.ffmpeg.hevc.decoder" type="video/hevc"&gt;
            &lt;Limit name="size" min="2x2" max="2048x2048" /&gt;
            &lt;Limit name="alignment" value="2x2" /&gt;
            &lt;Feature name="adaptive-playback" /&gt;
        &lt;/MediaCodec&gt;
    &lt;/Decoders&gt;

    &lt;Encoders&gt;
        &lt;!-- mediatek video encoders --&gt;
        &lt;MediaCodec name="OMX.MTK.VIDEO.ENCODER.MPEG4" type="video/mp4v-es" &gt;
            &lt;Limit name="size" min="16x16" max="1920x1088" /&gt;
            &lt;Limit name="alignment" value="16x16" /&gt;
            &lt;Limit name="block-size" value="16x16" /&gt;
            &lt;Quirk name="requires-allocate-on-input-ports" /&gt;
            &lt;Quirk name="requires-allocate-on-output-ports" /&gt;
        &lt;/MediaCodec&gt;

        &lt;MediaCodec name="OMX.MTK.VIDEO.ENCODER.H263" type="video/3gpp" &gt;
            &lt;Limit name="size" min="16x16" max="1920x1088" /&gt;
            &lt;Limit name="alignment" value="16x16" /&gt;
            &lt;Limit name="block-size" value="16x16" /&gt;
             &lt;Quirk name="requires-allocate-on-input-ports" /&gt;
            &lt;Quirk name="requires-allocate-on-output-ports" /&gt;
        &lt;/MediaCodec&gt;

        &lt;MediaCodec name="OMX.MTK.VIDEO.ENCODER.AVC" type="video/avc" &gt;
            &lt;Limit name="size" min="16x16" max="1920x1088" /&gt;
            &lt;Limit name="alignment" value="16x16" /&gt;
            &lt;Limit name="block-size" value="16x16" /&gt;
            &lt;Quirk name="requires-allocate-on-input-ports" /&gt;
            &lt;Quirk name="requires-allocate-on-output-ports" /&gt;
        &lt;/MediaCodec&gt;
    &lt;/Encoders&gt;

  &lt;!-- &lt;Include href="media_codecs_mediatek_audio.xml" /&gt; --&gt;
  &lt;!-- &lt;Include href="media_codecs_mediatek_video.xml" /&gt; --&gt;
    &lt;Include href="media_codecs_google_audio.xml" /&gt;
    &lt;Include href="media_codecs_google_telephony.xml" /&gt;
    &lt;Include href="media_codecs_google_video_le.xml" /&gt;
    &lt;Include href="media_codecs_ffmpeg.xml" /&gt;
&lt;/MediaCodecs&gt;


It may also point to other files as on my phone to get a complete list. Therefore, use the command below to get the full list of files listing codecs available on your device.

adb shell find /system/etc -type f -name "media_codecs*.xml"


You can then filter the files on the codec types with the following commands:

cat /system/etc/media_codecs*.xml | grep "type="


Media Codec Info app offers an easier way to list the codecs on a device.