• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

derive_sdk/23-Mar-2024-166130

framework/23-Mar-2024-13979

testing/23-Mar-2024-267174

tests/23-Mar-2024-338232

Android.bpD23-Mar-20241.9 KiB8071

OWNERSD23-Mar-202441 32

README.mdD23-Mar-20241.4 KiB3023

TEST_MAPPINGD23-Mar-2024132 1110

com.android.sdkext.avbpubkeyD23-Mar-20241 KiB

com.android.sdkext.pemD23-Mar-20243.2 KiB5251

com.android.sdkext.pk8D23-Mar-20242.3 KiB

com.android.sdkext.x509.pemD23-Mar-20242.1 KiB3635

gen_sdkinfo.pyD23-Mar-2024508 2016

manifest.jsonD23-Mar-202451 54

sdk.protoD23-Mar-2024798 2622

README.md

1# SdkExtensions module
2
3SdkExtensions is a module that decides the extension SDK level of the device,
4and provides APIs for applications to query the extension SDK level.
5
6## Structure
7
8The module is packaged in an apex, `com.android.sdkext`, and has two components:
9- `bin/derive_sdk`: Native binary that runs early in the device boot process and
10  reads metadata of other modules, to set system properties relating to the
11  extension SDK (for instance `build.version.extensions.r`).
12- `javalib/framework-sdkextension.jar`: This is a jar on the bootclasspath that
13  exposes APIs to applications to query the extension SDK level.
14
15## Deriving extension SDK level
16`derive_sdk` is a program that reads metadata stored in other apex modules, in
17the form of binary protobuf files in subpath `etc/sdkinfo.binarypb` inside each
18apex. The structure of this protobuf can be seen [here][sdkinfo-proto]. The
19exact steps for converting a set of metadata files to actual extension versions
20is likely to change over time, and should not be depended upon.
21
22## Reading extension SDK level
23The module exposes a java class [`SdkExtensions`][sdkextensions-java] in the
24package `android.os.ext`. The method `getExtensionVersion(int)` can be used to
25read the version of a particular sdk extension, e.g.
26`getExtensionVersion(Build.VERSION_CODES.R)`.
27
28[sdkinfo-proto]: sdk.proto
29[sdkextensions-java]: framework/java/android/os/ext/SdkExtensions.java
30