Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
derive_sdk/ | 23-Mar-2024 | - | 166 | 130 | ||
framework/ | 23-Mar-2024 | - | 139 | 79 | ||
testing/ | 23-Mar-2024 | - | 267 | 174 | ||
tests/ | 23-Mar-2024 | - | 338 | 232 | ||
Android.bp | D | 23-Mar-2024 | 1.9 KiB | 80 | 71 | |
OWNERS | D | 23-Mar-2024 | 41 | 3 | 2 | |
README.md | D | 23-Mar-2024 | 1.4 KiB | 30 | 23 | |
TEST_MAPPING | D | 23-Mar-2024 | 132 | 11 | 10 | |
com.android.sdkext.avbpubkey | D | 23-Mar-2024 | 1 KiB | |||
com.android.sdkext.pem | D | 23-Mar-2024 | 3.2 KiB | 52 | 51 | |
com.android.sdkext.pk8 | D | 23-Mar-2024 | 2.3 KiB | |||
com.android.sdkext.x509.pem | D | 23-Mar-2024 | 2.1 KiB | 36 | 35 | |
gen_sdkinfo.py | D | 23-Mar-2024 | 508 | 20 | 16 | |
manifest.json | D | 23-Mar-2024 | 51 | 5 | 4 | |
sdk.proto | D | 23-Mar-2024 | 798 | 26 | 22 |
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