Google is committed to advancing racial equity for Black communities. See how.

Media Modules

Android 10 or higher includes several updatable media components that enable updating framework components through Google Play Store infrastructure or through a partner-provided over-the-air (OTA) mechanism. Media components are packaged together in modules that allows providing security updates and feature updates without requiring a full system image update.

Updatable media components exist in the following modules.

For details on adding custom extractors and decoders, see Customizing Media Components.

Media extractors

In Android 9 and lower, extracters are compiled into a single file. In Android 10 or higher, media extractors are separate components. Each extractor has its own .so file with an entry point that provides a sniffer function to determine whether the extractor can handle the given media file, and a factory function that creates an instance of the extractor for the given media file. Each extractor is named (to help in debugging) and versioned to indicate which extractor is the newest.

The media framework automatically loads all available extractor .so files, so you can create your own extractors by adding a new .so file without needing to modify libstagefright or other media framework libraries. You can also ensure that a custom extractor is preferred over the Google-provided extractor.

MediaSession2 API

The MediaSession2 API allows media apps to expose their transport controls and playback information to other processes such as the Android framework and other apps. This component can't be customized.

MediaParser API

The MediaParser API allows ExoPlayer to make efficient use of framework media container parsers to extract media samples from media containers. MediaParser includes the following changes to source code boundaries:

  • frameworks/base/apex/media/framework/java/android/media/ API and thin layer implementation.

  • external/exoplayer/. Exoplayer verbatim sources on which MediaParser is built.

The MediaParser API can’t be customized. To test MediaParser, use the tests in cts/tests/tests/mediaparser/.

Media codecs

The Media Codecs module includes updatable software Codec2 components.

Format and dependences

The Media module ( and Media Codec module ( are in APEX format. Included media components rely only on NDK APIs.


During an update, the framework components on the device load an APEX package that contains Java and native code.

Media Updates

Figure 1. The media component update flow

After the framework installs the APEX package, the device reboots and mounts the disk image and media system processes (media.extractor and media.codec) load the updated modules from the mount point.