• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
19python_binary_host {
20    name: "deapexer",
21    srcs: [
22        "deapexer.py",
23    ],
24    libs: [
25        "apex_manifest",
26    ],
27    required: [
28        "blkid_static",
29        "debugfs_static",
30        "fsck.erofs",
31    ],
32}
33
34python_binary_host {
35    name: "apex_elf_checker",
36    srcs: [
37        "apex_elf_checker.py",
38    ],
39    required: [
40        "blkid_static",
41        "debugfs_static",
42        "fsck.erofs",
43    ],
44}
45
46python_binary_host {
47    name: "apex_compression_tool",
48    srcs: [
49        "apex_compression_tool.py",
50    ],
51    libs: [
52        "apex_manifest_proto",
53    ],
54    required: [
55        "avbtool",
56        "conv_apex_manifest",
57    ],
58}
59
60python_test_host {
61    name: "apex_compression_test",
62    pkg_path: "apex_compression_test",
63    main: "apex_compression_test.py",
64    srcs: [
65        "apex_compression_test.py",
66    ],
67    data: [
68        ":avbtool",
69        ":conv_apex_manifest",
70        ":apex_compression_tool",
71        ":deapexer",
72        ":soong_zip",
73    ],
74    device_common_data: [
75        ":com.android.example.apex",
76    ],
77    libs: [
78        "apex_manifest_proto",
79    ],
80    test_suites: ["general-tests"],
81    test_options: {
82        unit_test: true,
83    },
84}
85
86cc_binary_host {
87    name: "host_apex_verifier",
88    srcs: ["host_apex_verifier.cc"],
89    defaults: [
90        "init_host_defaults",
91        "libapex-deps",
92    ],
93    static_libs: [
94        "libapex",
95        "libinit_host",
96    ],
97}
98
99sh_test_host {
100    name: "host-apex-verifier",
101    src: "host-apex-verifier.sh",
102    test_suites: ["device-tests"],
103    test_config: "host-apex-verifier.xml",
104    test_options: {
105        unit_test: false,
106    },
107    data_bins: [
108        "deapexer",
109        "debugfs_static",
110        "fsck.erofs",
111        "host_apex_verifier",
112    ],
113    data_libs: [
114        "libbase",
115        "libc++",
116        "libcrypto",
117        "libcutils",
118        "liblog",
119        "libpcre2", // used by libselinux
120        "libprotobuf-cpp-full", // used by libapex
121        "libprotobuf-cpp-lite", // used by libinit_host
122        "libselinux", // used by libapex
123        "libz",
124        "libziparchive",
125    ],
126}
127
128python_library_host {
129    name: "apexer_wrapper_utils",
130    srcs: ["apexer_wrapper_utils.py"],
131}
132
133python_binary_host {
134    name: "apexer_with_DCLA_preprocessing",
135    srcs: [
136        "apexer_with_DCLA_preprocessing.py",
137    ],
138    libs: [
139        "apexer_wrapper_utils",
140    ],
141}
142
143python_test_host {
144    name: "apexer_with_DCLA_preprocessing_test",
145    main: "apexer_with_DCLA_preprocessing_test.py",
146    srcs: [
147        "apexer_with_DCLA_preprocessing_test.py",
148    ],
149    // Need to add a pkg_path because importlib.resources
150    // cannot load resources from the root package.
151    pkg_path: "apexer_with_DCLA_preprocessing_test",
152    data: [
153        ":apexer_test_host_tools",
154        ":apexer_with_DCLA_preprocessing",
155        "testdata/com.android.example.apex.pem",
156    ],
157    device_common_data: [
158        ":com.android.example.apex",
159    ],
160    test_suites: ["general-tests"],
161    test_options: {
162        unit_test: true,
163    },
164}
165
166python_binary_host {
167    name: "apexer_with_trim_preprocessing",
168    srcs: [
169        "apexer_with_trim_preprocessing.py",
170    ],
171    libs: [
172        "apex_manifest_proto",
173        "apexer_wrapper_utils",
174    ],
175}
176
177python_binary_host {
178    name: "apexd_host",
179    srcs: ["apexd_host.py"],
180    libs: [
181        "apex_manifest",
182    ],
183    required: [
184        "deapexer",
185        "debugfs",
186        "fsck.erofs",
187    ],
188}
189
190python_binary_host {
191    name: "brand_new_apex_verifier",
192    srcs: ["brand_new_apex_verifier.py"],
193    version: {
194        py3: {
195            embedded_launcher: true,
196        },
197    },
198    libs: [
199        "apex_blocklist_proto",
200    ],
201}
202