tree: 9589f7066cf36b931c7328eb1040ebd47580c165 [path history] [tgz]
  1. build/
  2. prebuilts/
  3. Android.bp

Cts Shim Apex


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:

  • Its name is equal to
  • It is signed with a throw-away key.
  • First version (i.e. 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.

Building shim apexes

Modules to build shim apexes are defined in the system/apex/shim/build/Android.bp blueprint file.

To build shim apexes simply run

m \ \ \ \ \ \ \ \ \ \ \

Generated apexes will be located in the following folders.

  • out/target/product/${DEVICE}/obj/ETC/
  • out/target/product/${DEVICE}/obj/ETC/
  • out/target/product/${DEVICE}/obj/ETC/
  • etc.

Updating shim apexes

Shim apex files should be built on a build server and then downloaded from it into following directories:

  • system/apex/shim
  • cts/hostsidetests/stagedinstall/testdata/apex