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,
javalib/framework-sdkextension.jar. This file is on the bootclasspath that exposes APIs to apps to query the extension SDK level.
The SDK Extensions module (
com.android.sdkext) is in
APEX format and is available for devices
running Android 11 or higher.
Deriving extension SDK level
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
Reading extension SDK level
The SDK Extensions module exposes an
java class in the
android.os.ext package. Use the
method to read the version of an SDK extension (for example,