A shim apex is an apex that doesn't provide any functionality as it's sole purpose is to enable CTS testing of APEX-related APIs.
A cts shim apex has following restrictions:
com.android.apex.cts.shim
com.android.apex.cts.shim.apex
) should be pre-installed on the /system/partition.apex_payload.img
of the pre-installed shim apexcontains a single text file called hash.txt
with a list of allowed SHA512 hashes of versions shim apex can be upgraded to.apex_payload.img
of all other versions contains SHA512 hash of /dev/null
.Modules to build shim apexes are defined in the system/apex/shim/build/Android.bp blueprint file.
To build shim apexes simply run
m com.android.apex.cts.shim.v3 \ com.android.apex.cts.shim.v2 \ com.android.apex.cts.shim.v2_additional_file \ com.android.apex.cts.shim.v2_additional_folder \ com.android.apex.cts.shim.v2_different_certificate \ com.android.apex.cts.shim.v2_different_package_name \ com.android.apex.cts.shim.v2_with_pre_install_hook \ com.android.apex.cts.shim.v2_with_post_install_hook \ com.android.apex.cts.shim.v2_wrong_sha \ com.android.apex.cts.shim.v1 \ com.android.apex.cts.shim_not_pre_installed \
Generated apexes will be located in the following folders.
Shim apex files should be built on a build server and then downloaded from it into following directories: