SDK Extensions

The SDK Extensions module decides the extension SDK level of the device and provides APIs for apps to query the extension SDK level. This module is updatable, meaning it can receive updates to functionality outside of the normal Android release cycle.

The SDK Extensions module has the following components.

  • bin/derive_sdk. This native binary runs early in the device boot process and reads metadata of other modules to set system properties related to the extension SDK (for example, build.version.extensions.r).

  • javalib/framework-sdkextension.jar. This file is on the bootclasspath that exposes APIs to apps to query the extension SDK level.

Module format

The SDK Extensions module ( is in APEX format and is available for devices running Android 11 or higher.

Deriving extension SDK level

The derive_sdk program reads metadata stored as binary protobuf files in etc/sdkinfo.binarypb subpath inside each APEX module. For details on protobuf structure, refer to the sdk.proto file.

Reading extension SDK level

The SDK Extensions module exposes an SdkExtensions java class in the android.os.ext package. Use the getExtensionVersion(int) method to read the version of an SDK extension (for example, getExtensionVersion(Build.VERSION_CODES.R)).