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

..--

build/23-Nov-2023-734655

prebuilts/23-Nov-2023-

Android.bpD23-Nov-20236.3 KiB223210

README.mdD23-Nov-20232 KiB5641

README.md

1# Cts Shim Apex
2
3## Overview
4
5A shim apex is an apex that doesn't provide any functionality as it's sole
6purpose is to enable CTS testing of APEX-related APIs.
7
8A cts shim apex has following restrictions:
9
10*   Its name is equal to `com.android.apex.cts.shim`
11*   It is signed with a throw-away key.
12*   First version (i.e. `com.android.apex.cts.shim.apex`) should be
13    pre-installed on the /system/partition.
14*   `apex_payload.img` of the pre-installed shim apexcontains a single text
15    file called `hash.txt` with a list of allowed SHA512 hashes of versions shim
16    apex can be upgraded to.
17*   `apex_payload.img` of all other versions contains SHA512 hash of
18    `/dev/null`.
19
20
21## Building shim apexes
22
23Modules to build shim apexes are defined in the
24system/apex/shim/build/Android.bp blueprint file.
25
26To build shim apexes simply run
27
28```
29m com.android.apex.cts.shim.v3 \
30  com.android.apex.cts.shim.v2 \
31  com.android.apex.cts.shim.v2_additional_file \
32  com.android.apex.cts.shim.v2_additional_folder \
33  com.android.apex.cts.shim.v2_different_certificate \
34  com.android.apex.cts.shim.v2_different_package_name \
35  com.android.apex.cts.shim.v2_with_pre_install_hook \
36  com.android.apex.cts.shim.v2_with_post_install_hook \
37  com.android.apex.cts.shim.v2_wrong_sha \
38  com.android.apex.cts.shim.v1 \
39  com.android.apex.cts.shim_not_pre_installed \
40```
41
42Generated apexes will be located in the following folders.
43
44*   out/target/product/${DEVICE}/obj/ETC/com.android.apex.cts.shim.v1_intermediates/com.android.apex.cts.shim.v1.apex
45*   out/target/product/${DEVICE}/obj/ETC/com.android.apex.cts.shim.v2_intermediates/com.android.apex.cts.shim.v2.apex
46*   out/target/product/${DEVICE}/obj/ETC/com.android.apex.cts.shim.v2_wrong_sha_intermediates/com.android.apex.cts.shim.v2_wrong_sha.apex
47*   etc.
48
49## Updating shim apexes
50
51Shim apex files should be built on a build server and then downloaded from it
52into following directories:
53
54*   system/apex/shim
55*   cts/hostsidetests/stagedinstall/testdata/apex
56