blob: 3ddb2cb085e35ea3cd485e76244c22298e006270 [file] [log] [blame]
Tao Bao30e31142019-04-09 00:12:30 -07001// 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
Tao Bao3c7b2a62019-08-07 12:24:20 -070015//
16// Module-specific defaults.
17//
18// For module X, if we need to build it both as a library and an executable:
19// - A default rule `releasetools_X_defaults` is created, which lists `srcs`, `libs` and
20// `required` properties.
21// - `python_library_host` and `python_binary_host` are created by listing
22// `releasetools_X_defaults` in their defaults.
23//
24
Bob Badour03905802021-02-12 21:42:54 -080025package {
26 default_applicable_licenses: ["Android-Apache-2.0"],
27}
28
Tao Bao3c7b2a62019-08-07 12:24:20 -070029python_defaults {
30 name: "releasetools_add_img_to_target_files_defaults",
31 srcs: [
32 "add_img_to_target_files.py",
33 ],
34 libs: [
Kelvin Zhang5f0fcee2021-01-19 15:30:46 -050035 "ota_metadata_proto",
36 "releasetools_apex_utils",
Tao Bao3c7b2a62019-08-07 12:24:20 -070037 "releasetools_build_image",
38 "releasetools_build_super_image",
39 "releasetools_common",
Kelvin Zhang1caead02022-09-23 10:06:03 -070040 "libavbtool",
Tao Bao3c7b2a62019-08-07 12:24:20 -070041 ],
42 required: [
43 "care_map_generator",
44 ],
45}
46
47python_defaults {
48 name: "releasetools_build_image_defaults",
49 srcs: [
50 "build_image.py",
51 ],
52 libs: [
53 "releasetools_common",
Inseob Kim9cda3972021-10-12 22:59:12 +090054 "releasetools_fsverity_metadata_generator",
Tao Bao3c7b2a62019-08-07 12:24:20 -070055 "releasetools_verity_utils",
56 ],
57 required: [
58 "blk_alloc_to_base_fs",
59 "e2fsck",
David Anderson94ad5bb2022-03-04 10:57:58 -080060 "fsck.erofs",
61 "img2simg",
62 "mkfs.erofs",
Yifan Hong77023452020-08-25 16:15:16 -070063 "mkuserimg_mke2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070064 "simg2img",
65 "tune2fs",
Cole Faustb0002082022-09-05 18:34:56 -070066 "mkf2fsuserimg",
Jaegeuk Kim1f50a362021-06-08 18:24:46 -070067 "fsck.f2fs",
Tao Bao3c7b2a62019-08-07 12:24:20 -070068 ],
69}
70
71python_defaults {
72 name: "releasetools_build_super_image_defaults",
73 srcs: [
74 "build_super_image.py",
75 ],
76 libs: [
77 "releasetools_common",
78 ],
79}
80
81python_defaults {
82 name: "releasetools_img_from_target_files_defaults",
83 srcs: [
84 "img_from_target_files.py",
85 ],
86 libs: [
87 "releasetools_build_super_image",
88 "releasetools_common",
89 ],
90}
91
92python_defaults {
Yifan Honge3ba82c2019-08-21 13:29:30 -070093 name: "releasetools_check_target_files_vintf_defaults",
94 srcs: [
95 "check_target_files_vintf.py",
96 ],
97 libs: [
Jooyung Haneb118212022-10-17 18:07:28 +090098 "apex_manifest",
Yifan Honge3ba82c2019-08-21 13:29:30 -070099 "releasetools_common",
100 ],
101 required: [
Jooyung Hanc9542ab2023-06-27 16:12:32 +0900102 "apexd_host",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700103 "checkvintf",
104 ],
105}
106
Tianjiea2076132020-08-19 17:25:32 -0700107python_library_host {
108 name: "ota_metadata_proto",
Tianjiea2076132020-08-19 17:25:32 -0700109 srcs: [
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700110 "ota_metadata.proto",
Tianjiea2076132020-08-19 17:25:32 -0700111 ],
112 proto: {
113 canonical_path_from_root: false,
114 },
115}
116
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400117cc_library_static {
118 name: "ota_metadata_proto_cc",
119 srcs: [
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700120 "ota_metadata.proto",
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400121 ],
122 host_supported: true,
123 recovery_available: true,
124 proto: {
125 canonical_path_from_root: false,
126 type: "lite",
127 export_proto_headers: true,
128 },
129}
130
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400131java_library_static {
132 name: "ota_metadata_proto_java",
133 host_supported: true,
134 proto: {
135 type: "nano",
136 },
137 srcs: ["ota_metadata.proto"],
138 sdk_version: "9",
139 target: {
140 android: {
141 jarjar_rules: "jarjar-rules.txt",
142 },
143 host: {
144 static_libs: ["libprotobuf-java-nano"],
145 },
146 },
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700147 visibility: ["//frameworks/base:__subpackages__"],
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400148}
149
Yifan Honge3ba82c2019-08-21 13:29:30 -0700150python_defaults {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700151 name: "releasetools_ota_from_target_files_defaults",
152 srcs: [
153 "edify_generator.py",
Kelvin Zhangcff4d762020-07-29 16:37:51 -0400154 "non_ab_ota.py",
Tianjiea2076132020-08-19 17:25:32 -0700155 "ota_from_target_files.py",
Tianjiea2076132020-08-19 17:25:32 -0700156 "target_files_diff.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700157 ],
158 libs: [
Tianjiea2076132020-08-19 17:25:32 -0700159 "ota_metadata_proto",
Yifan Hong9276cf02019-08-21 16:37:04 -0700160 "releasetools_check_target_files_vintf",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700161 "releasetools_common",
162 "releasetools_verity_utils",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000163 "apex_manifest",
Kelvin Zhang766eea72021-06-03 09:36:08 -0400164 "care_map_proto_py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700165 "ota_utils_lib",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700166 ],
167 required: [
Jooyung Hanccec6ad2023-08-29 10:16:31 +0900168 "apexd_host",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700169 "brillo_update_payload",
Yifan Hong09298552019-09-04 11:49:01 -0700170 "checkvintf",
Yifan Hong125d0b62020-09-24 17:07:03 -0700171 "lz4",
172 "toybox",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000173 "unpack_bootimg",
174 "deapexer",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700175 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000176 target: {
177 darwin: {
178 // required module "brillo_update_payload" is disabled on darwin
179 enabled: false,
180 },
181 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700182}
183
184//
185// Host libraries.
186//
187
Tao Bao30e31142019-04-09 00:12:30 -0700188python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700189 name: "releasetools_add_img_to_target_files",
190 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700191 "releasetools_add_img_to_target_files_defaults",
192 ],
193}
194
195python_library_host {
196 name: "releasetools_apex_utils",
Tao Bao005305a2019-08-05 13:00:44 -0700197 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700198 "apex_utils.py",
199 ],
200 libs: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000201 "apex_manifest",
202 "ota_metadata_proto",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700203 "releasetools_common",
204 ],
205}
206
207python_library_host {
208 name: "releasetools_build_image",
209 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700210 "releasetools_build_image_defaults",
211 ],
212}
213
214python_library_host {
215 name: "releasetools_build_super_image",
216 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700217 "releasetools_build_super_image_defaults",
Tao Bao005305a2019-08-05 13:00:44 -0700218 ],
219}
220
221python_library_host {
Yifan Hongccb86fe2019-08-22 15:52:26 -0700222 name: "releasetools_check_target_files_vintf",
223 defaults: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700224 "releasetools_check_target_files_vintf_defaults",
225 ],
226}
227
228python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700229 name: "releasetools_common",
Tao Bao30e31142019-04-09 00:12:30 -0700230 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700231 "blockimgdiff.py",
Tao Bao30e31142019-04-09 00:12:30 -0700232 "common.py",
Tianjie Xu41976c72019-07-03 13:57:01 -0700233 "images.py",
Tao Bao30e31142019-04-09 00:12:30 -0700234 "rangelib.py",
Tao Bao30e31142019-04-09 00:12:30 -0700235 "sparse_img.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700236 ],
Wei Li6437bae2023-10-16 16:22:34 -0700237 data: [
238 ":zip2zip",
239 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700240 // Only the tools that are referenced directly are listed as required modules. For example,
241 // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool'].
242 required: [
changho.shin0f125362019-07-08 10:59:00 +0900243 "aapt2",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700244 "boot_signer",
245 "brotli",
246 "bsdiff",
J. Avila98cd4cc2020-06-10 20:09:10 +0000247 "lz4",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700248 "mkbootfs",
Luca Stefani3e4b4482020-03-27 14:00:23 +0100249 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800250 "toybox",
251 "unpack_bootimg",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700252 ],
253}
254
255python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700256 name: "releasetools_img_from_target_files",
257 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700258 "releasetools_img_from_target_files_defaults",
259 ],
260}
261
262python_library_host {
263 name: "releasetools_ota_from_target_files",
264 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700265 "releasetools_ota_from_target_files_defaults",
266 ],
267}
268
269python_library_host {
Inseob Kim9cda3972021-10-12 22:59:12 +0900270 name: "releasetools_fsverity_metadata_generator",
271 srcs: [
272 "fsverity_metadata_generator.py",
273 ],
Inseob Kimf69346e2021-10-13 15:16:33 +0900274 libs: [
275 "fsverity_digests_proto_python",
Inseob Kim9cda3972021-10-12 22:59:12 +0900276 ],
277}
278
279python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700280 name: "releasetools_verity_utils",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700281 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700282 "verity_utils.py",
283 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700284 required: [
285 "append2simg",
286 "build_verity_metadata",
287 "build_verity_tree",
288 "fec",
289 ],
290}
291
Tao Bao3c7b2a62019-08-07 12:24:20 -0700292//
293// Host binaries.
294//
295
Tao Bao2bbb07c2019-05-07 13:12:21 -0700296python_defaults {
297 name: "releasetools_binary_defaults",
298 version: {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700299 py3: {
Cole Faustc76931f2021-11-04 16:59:39 -0700300 embedded_launcher: true,
Tao Bao2bbb07c2019-05-07 13:12:21 -0700301 },
302 },
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900303 // TODO (b/140144201) Build imgdiff from releasetools_common
304 required: [
305 "aapt2",
306 "boot_signer",
307 "brotli",
308 "bsdiff",
Mohammad Samiul Islamf4909b42021-02-01 20:43:41 +0000309 "deapexer",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000310 "lz4",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900311 "mkbootfs",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000312 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800313 "toybox",
314 "unpack_bootimg",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900315 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700316}
317
318python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700319 name: "add_img_to_target_files",
320 defaults: [
321 "releasetools_binary_defaults",
322 "releasetools_add_img_to_target_files_defaults",
323 ],
324}
325
Kelvin Zhang197772f2022-04-26 15:15:11 -0700326python_library_host {
327 name: "ota_utils_lib",
328 srcs: [
329 "ota_utils.py",
330 "payload_signer.py",
Kelvin Zhangb84d2aa2023-11-06 10:53:41 -0800331 "ota_signing_utils.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700332 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700333 libs: [
334 "releasetools_common",
335 ],
Kelvin Zhang197772f2022-04-26 15:15:11 -0700336}
337
338python_binary_host {
339 name: "merge_ota",
340 version: {
341 py3: {
342 embedded_launcher: true,
343 },
344 },
345 srcs: [
346 "merge_ota.py",
347 ],
348 libs: [
349 "ota_metadata_proto",
350 "update_payload",
351 "care_map_proto_py",
352 "releasetools_common",
353 "ota_utils_lib",
354 ],
355}
356
Tao Bao3c7b2a62019-08-07 12:24:20 -0700357python_binary_host {
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700358 name: "create_brick_ota",
359 version: {
360 py3: {
361 embedded_launcher: true,
362 },
363 },
364 srcs: [
365 "create_brick_ota.py",
366 ],
367 libs: [
368 "ota_utils_lib",
369 ],
370}
371
372python_binary_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700373 name: "build_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700374 defaults: [
375 "releasetools_binary_defaults",
376 "releasetools_build_image_defaults",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700377 ],
378}
379
380python_binary_host {
381 name: "build_super_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700382 defaults: [
383 "releasetools_binary_defaults",
384 "releasetools_build_super_image_defaults",
385 ],
386}
387
388python_binary_host {
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000389 name: "check_partition_sizes",
390 srcs: [
391 "check_partition_sizes.py",
392 ],
393 libs: [
394 "releasetools_common",
395 ],
396 defaults: [
397 "releasetools_binary_defaults",
398 ],
399}
400
401python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700402 name: "check_ota_package_signature",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700403 defaults: ["releasetools_binary_defaults"],
404 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700405 "check_ota_package_signature.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700406 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700407 libs: [
408 "releasetools_common",
409 ],
Tao Bao3c7b2a62019-08-07 12:24:20 -0700410 required: [
411 "delta_generator",
412 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000413 target: {
414 darwin: {
415 // required module "delta_generator" is disabled on darwin
416 enabled: false,
417 },
418 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700419}
420
421python_binary_host {
422 name: "check_target_files_signatures",
423 defaults: ["releasetools_binary_defaults"],
424 srcs: [
425 "check_target_files_signatures.py",
426 ],
427 libs: [
428 "releasetools_common",
429 ],
430 required: [
Elliott Hughes16a5cac2021-05-14 15:27:23 -0700431 "aapt2",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700432 ],
433}
434
435python_binary_host {
Yifan Honge3ba82c2019-08-21 13:29:30 -0700436 name: "check_target_files_vintf",
437 defaults: [
438 "releasetools_binary_defaults",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700439 "releasetools_check_target_files_vintf_defaults",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700440 ],
441}
442
443python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700444 name: "img_from_target_files",
445 defaults: [
446 "releasetools_binary_defaults",
447 "releasetools_img_from_target_files_defaults",
448 ],
Tao Bao30e31142019-04-09 00:12:30 -0700449}
450
Daniel Normanb8d52a22020-10-26 17:55:00 -0700451python_defaults {
452 name: "releasetools_find_shareduid_violation_defaults",
453 srcs: [
454 "find_shareduid_violation.py",
455 ],
456 libs: [
457 "releasetools_common",
458 ],
459}
460
461python_binary_host {
462 name: "find_shareduid_violation",
463 defaults: [
464 "releasetools_binary_defaults",
465 "releasetools_find_shareduid_violation_defaults",
466 ],
467}
468
469python_library_host {
470 name: "releasetools_find_shareduid_violation",
471 defaults: [
472 "releasetools_find_shareduid_violation_defaults",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700473 ],
474}
475
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700476python_binary_host {
Tao Baoe11a4602019-08-06 23:21:23 -0700477 name: "make_recovery_patch",
478 defaults: ["releasetools_binary_defaults"],
479 srcs: [
480 "make_recovery_patch.py",
481 ],
482 libs: [
483 "releasetools_common",
484 ],
485}
486
487python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700488 name: "ota_from_target_files",
489 defaults: [
490 "releasetools_binary_defaults",
491 "releasetools_ota_from_target_files_defaults",
492 ],
493}
494
495python_binary_host {
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700496 name: "ota_from_raw_img",
497 srcs: [
498 "ota_from_raw_img.py",
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700499 ],
500 main: "ota_from_raw_img.py",
501 defaults: [
502 "releasetools_binary_defaults",
503 ],
504 required: [
505 "delta_generator",
506 ],
507 libs: [
508 "ota_metadata_proto",
509 "releasetools_common",
510 "ota_utils_lib",
511 ],
512}
513
514python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700515 name: "ota_package_parser",
516 defaults: ["releasetools_binary_defaults"],
517 srcs: [
518 "ota_package_parser.py",
519 "rangelib.py",
Tao Bao8821d642019-08-05 12:05:45 -0700520 ],
521}
522
Tao Baoe11a4602019-08-06 23:21:23 -0700523python_binary_host {
524 name: "sparse_img",
525 defaults: ["releasetools_binary_defaults"],
526 srcs: [
527 "rangelib.py",
528 "sparse_img.py",
529 ],
Tao Baoe11a4602019-08-06 23:21:23 -0700530}
531
Tao Bao3c7b2a62019-08-07 12:24:20 -0700532python_binary_host {
533 name: "sign_apex",
534 defaults: ["releasetools_binary_defaults"],
535 srcs: [
536 "sign_apex.py",
537 ],
538 libs: [
539 "releasetools_apex_utils",
540 "releasetools_common",
541 ],
542}
543
544python_binary_host {
545 name: "sign_target_files_apks",
546 defaults: ["releasetools_binary_defaults"],
547 srcs: [
548 "sign_target_files_apks.py",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700549 "ota_from_raw_img.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700550 ],
551 libs: [
552 "releasetools_add_img_to_target_files",
553 "releasetools_apex_utils",
554 "releasetools_common",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700555 "ota_metadata_proto",
556 "ota_utils_lib",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700557 ],
558}
559
560python_binary_host {
561 name: "validate_target_files",
562 defaults: ["releasetools_binary_defaults"],
563 srcs: [
564 "validate_target_files.py",
565 ],
566 libs: [
567 "releasetools_common",
568 ],
569}
570
Jiyong Parkb92b8f42021-03-15 23:13:42 +0900571python_binary_host {
572 name: "verity_utils",
573 defaults: ["releasetools_binary_defaults"],
574 srcs: [
575 "verity_utils.py",
576 ],
577 libs: [
578 "releasetools_common",
579 ],
580 required: [
581 "append2simg",
582 "build_verity_metadata",
583 "build_verity_tree",
584 "fec",
585 ],
586}
587
Inseob Kim2d034932021-12-13 14:04:00 +0900588python_binary_host {
Inseob Kim135c1f12022-01-06 17:22:07 +0900589 name: "fsverity_metadata_generator",
Inseob Kim293112d2022-02-16 11:22:03 +0900590 defaults: ["releasetools_binary_defaults"],
Inseob Kim135c1f12022-01-06 17:22:07 +0900591 srcs: [
592 "fsverity_metadata_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900593 ],
594 required: [
595 "fsverity",
596 ],
597}
598
Tao Bao3c7b2a62019-08-07 12:24:20 -0700599//
600// Tests.
601//
602
Tao Baoca82fc92019-05-01 21:58:03 -0700603python_defaults {
604 name: "releasetools_test_defaults",
Tao Bao30e31142019-04-09 00:12:30 -0700605 srcs: [
Tao Bao2bbb07c2019-05-07 13:12:21 -0700606 "check_ota_package_signature.py",
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000607 "check_partition_sizes.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700608 "check_target_files_signatures.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700609 "make_recovery_patch.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700610 "ota_package_parser.py",
611 "sign_apex.py",
612 "sign_target_files_apks.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700613 "validate_target_files.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700614 "merge_ota.py",
Daniel Norman2b0b9ca2022-03-02 16:12:08 -0800615 ":releasetools_merge_sources",
616 ":releasetools_merge_tests",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700617
Tao Bao30e31142019-04-09 00:12:30 -0700618 "test_*.py",
619 ],
620 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700621 "releasetools_add_img_to_target_files",
622 "releasetools_apex_utils",
623 "releasetools_build_image",
Tao Bao005305a2019-08-05 13:00:44 -0700624 "releasetools_build_super_image",
Yifan Hongccb86fe2019-08-22 15:52:26 -0700625 "releasetools_check_target_files_vintf",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700626 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700627 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700628 "releasetools_img_from_target_files",
629 "releasetools_ota_from_target_files",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700630 "releasetools_verity_utils",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700631 "update_payload",
Tao Bao30e31142019-04-09 00:12:30 -0700632 ],
633 data: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700634 "testdata/**/*",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000635 ":com.android.apex.compressed.v1",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700636 ":com.android.apex.vendor.foo.with_vintf",
Tao Bao30e31142019-04-09 00:12:30 -0700637 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000638 target: {
639 darwin: {
640 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
641 enabled: false,
642 },
643 },
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000644 required: [
Jooyung Hanccec6ad2023-08-29 10:16:31 +0900645 "apexd_host",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000646 "deapexer",
647 ],
Tao Baoca82fc92019-05-01 21:58:03 -0700648}
649
650python_test_host {
651 name: "releasetools_test",
652 defaults: ["releasetools_test_defaults"],
653 main: "test_utils.py",
Cole Faustc76931f2021-11-04 16:59:39 -0700654 // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from
655 // host, because the test executable won't be able to find the needed libs via its
656 // runpath.
Julien Desprez6d9e78f2020-12-21 13:56:05 -0800657 test_options: {
658 unit_test: true,
659 },
Tao Bao30e31142019-04-09 00:12:30 -0700660}