blob: 2232385c6cc182a2fb6525a803ce49d0f259d2f8 [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",
Jooyung Han1e45baf2024-08-15 07:38:17 +000099 "releasetools_apex_utils",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700100 "releasetools_common",
101 ],
102 required: [
Jooyung Hanc9542ab2023-06-27 16:12:32 +0900103 "apexd_host",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700104 "checkvintf",
105 ],
106}
107
Tianjiea2076132020-08-19 17:25:32 -0700108python_library_host {
109 name: "ota_metadata_proto",
Tianjiea2076132020-08-19 17:25:32 -0700110 srcs: [
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700111 "ota_metadata.proto",
Tianjiea2076132020-08-19 17:25:32 -0700112 ],
113 proto: {
114 canonical_path_from_root: false,
115 },
116}
117
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400118cc_library_static {
119 name: "ota_metadata_proto_cc",
120 srcs: [
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700121 "ota_metadata.proto",
Kelvin Zhanga3a74b62021-05-14 17:18:43 -0400122 ],
123 host_supported: true,
124 recovery_available: true,
125 proto: {
126 canonical_path_from_root: false,
127 type: "lite",
128 export_proto_headers: true,
129 },
130}
131
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400132java_library_static {
133 name: "ota_metadata_proto_java",
134 host_supported: true,
135 proto: {
136 type: "nano",
137 },
138 srcs: ["ota_metadata.proto"],
139 sdk_version: "9",
140 target: {
141 android: {
142 jarjar_rules: "jarjar-rules.txt",
143 },
144 host: {
145 static_libs: ["libprotobuf-java-nano"],
146 },
147 },
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700148 visibility: ["//frameworks/base:__subpackages__"],
Kelvin Zhang2b6a9c32021-04-12 17:24:26 -0400149}
150
Yifan Honge3ba82c2019-08-21 13:29:30 -0700151python_defaults {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700152 name: "releasetools_ota_from_target_files_defaults",
153 srcs: [
154 "edify_generator.py",
Kelvin Zhangcff4d762020-07-29 16:37:51 -0400155 "non_ab_ota.py",
Tianjiea2076132020-08-19 17:25:32 -0700156 "ota_from_target_files.py",
Tianjiea2076132020-08-19 17:25:32 -0700157 "target_files_diff.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700158 ],
159 libs: [
Tianjiea2076132020-08-19 17:25:32 -0700160 "ota_metadata_proto",
Yifan Hong9276cf02019-08-21 16:37:04 -0700161 "releasetools_check_target_files_vintf",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700162 "releasetools_common",
163 "releasetools_verity_utils",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000164 "apex_manifest",
Kelvin Zhang766eea72021-06-03 09:36:08 -0400165 "care_map_proto_py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700166 "ota_utils_lib",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700167 ],
168 required: [
Jooyung Hanccec6ad2023-08-29 10:16:31 +0900169 "apexd_host",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700170 "brillo_update_payload",
Yifan Hong09298552019-09-04 11:49:01 -0700171 "checkvintf",
Yifan Hong125d0b62020-09-24 17:07:03 -0700172 "lz4",
173 "toybox",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000174 "unpack_bootimg",
175 "deapexer",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700176 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000177 target: {
178 darwin: {
179 // required module "brillo_update_payload" is disabled on darwin
180 enabled: false,
181 },
182 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700183}
184
185//
186// Host libraries.
187//
188
Tao Bao30e31142019-04-09 00:12:30 -0700189python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700190 name: "releasetools_add_img_to_target_files",
191 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700192 "releasetools_add_img_to_target_files_defaults",
193 ],
194}
195
196python_library_host {
197 name: "releasetools_apex_utils",
Tao Bao005305a2019-08-05 13:00:44 -0700198 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700199 "apex_utils.py",
200 ],
201 libs: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000202 "apex_manifest",
203 "ota_metadata_proto",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700204 "releasetools_common",
205 ],
206}
207
208python_library_host {
209 name: "releasetools_build_image",
210 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700211 "releasetools_build_image_defaults",
212 ],
213}
214
215python_library_host {
216 name: "releasetools_build_super_image",
217 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700218 "releasetools_build_super_image_defaults",
Tao Bao005305a2019-08-05 13:00:44 -0700219 ],
220}
221
222python_library_host {
Yifan Hongccb86fe2019-08-22 15:52:26 -0700223 name: "releasetools_check_target_files_vintf",
224 defaults: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700225 "releasetools_check_target_files_vintf_defaults",
226 ],
227}
228
229python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700230 name: "releasetools_common",
Tao Bao30e31142019-04-09 00:12:30 -0700231 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700232 "blockimgdiff.py",
Tao Bao30e31142019-04-09 00:12:30 -0700233 "common.py",
Tianjie Xu41976c72019-07-03 13:57:01 -0700234 "images.py",
Tao Bao30e31142019-04-09 00:12:30 -0700235 "rangelib.py",
Tao Bao30e31142019-04-09 00:12:30 -0700236 "sparse_img.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700237 ],
Wei Li6437bae2023-10-16 16:22:34 -0700238 data: [
239 ":zip2zip",
240 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700241 // Only the tools that are referenced directly are listed as required modules. For example,
242 // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool'].
243 required: [
changho.shin0f125362019-07-08 10:59:00 +0900244 "aapt2",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700245 "boot_signer",
246 "brotli",
247 "bsdiff",
J. Avila98cd4cc2020-06-10 20:09:10 +0000248 "lz4",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700249 "mkbootfs",
Luca Stefani3e4b4482020-03-27 14:00:23 +0100250 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800251 "toybox",
252 "unpack_bootimg",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700253 ],
254}
255
256python_library_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700257 name: "releasetools_img_from_target_files",
258 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700259 "releasetools_img_from_target_files_defaults",
260 ],
261}
262
263python_library_host {
264 name: "releasetools_ota_from_target_files",
265 defaults: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700266 "releasetools_ota_from_target_files_defaults",
267 ],
268}
269
270python_library_host {
Inseob Kim9cda3972021-10-12 22:59:12 +0900271 name: "releasetools_fsverity_metadata_generator",
272 srcs: [
273 "fsverity_metadata_generator.py",
274 ],
Inseob Kimf69346e2021-10-13 15:16:33 +0900275 libs: [
276 "fsverity_digests_proto_python",
Inseob Kim9cda3972021-10-12 22:59:12 +0900277 ],
278}
279
280python_library_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700281 name: "releasetools_verity_utils",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700282 srcs: [
Tao Bao30e31142019-04-09 00:12:30 -0700283 "verity_utils.py",
284 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700285 required: [
286 "append2simg",
287 "build_verity_metadata",
288 "build_verity_tree",
289 "fec",
290 ],
291}
292
Tao Bao3c7b2a62019-08-07 12:24:20 -0700293//
294// Host binaries.
295//
296
Tao Bao2bbb07c2019-05-07 13:12:21 -0700297python_defaults {
298 name: "releasetools_binary_defaults",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900299 // TODO (b/140144201) Build imgdiff from releasetools_common
300 required: [
301 "aapt2",
302 "boot_signer",
303 "brotli",
304 "bsdiff",
Mohammad Samiul Islamf4909b42021-02-01 20:43:41 +0000305 "deapexer",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000306 "lz4",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900307 "mkbootfs",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000308 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800309 "toybox",
310 "unpack_bootimg",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900311 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700312}
313
314python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700315 name: "add_img_to_target_files",
316 defaults: [
317 "releasetools_binary_defaults",
318 "releasetools_add_img_to_target_files_defaults",
319 ],
320}
321
Kelvin Zhang197772f2022-04-26 15:15:11 -0700322python_library_host {
323 name: "ota_utils_lib",
324 srcs: [
325 "ota_utils.py",
326 "payload_signer.py",
Kelvin Zhangb84d2aa2023-11-06 10:53:41 -0800327 "ota_signing_utils.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700328 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700329 libs: [
330 "releasetools_common",
331 ],
Kelvin Zhang197772f2022-04-26 15:15:11 -0700332}
333
334python_binary_host {
335 name: "merge_ota",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700336 srcs: [
337 "merge_ota.py",
338 ],
339 libs: [
340 "ota_metadata_proto",
341 "update_payload",
342 "care_map_proto_py",
343 "releasetools_common",
344 "ota_utils_lib",
345 ],
346}
347
Tao Bao3c7b2a62019-08-07 12:24:20 -0700348python_binary_host {
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700349 name: "create_brick_ota",
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700350 srcs: [
351 "create_brick_ota.py",
352 ],
353 libs: [
354 "ota_utils_lib",
355 ],
Kelvin Zhang41d38332024-09-10 14:35:18 -0700356 required: [
357 "signapk",
358 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700359}
360
361python_binary_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700362 name: "build_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700363 defaults: [
364 "releasetools_binary_defaults",
365 "releasetools_build_image_defaults",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700366 ],
367}
368
369python_binary_host {
370 name: "build_super_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700371 defaults: [
372 "releasetools_binary_defaults",
373 "releasetools_build_super_image_defaults",
374 ],
375}
376
377python_binary_host {
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000378 name: "check_partition_sizes",
379 srcs: [
380 "check_partition_sizes.py",
381 ],
382 libs: [
383 "releasetools_common",
384 ],
385 defaults: [
386 "releasetools_binary_defaults",
387 ],
388}
389
390python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700391 name: "check_ota_package_signature",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700392 defaults: ["releasetools_binary_defaults"],
393 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700394 "check_ota_package_signature.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700395 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700396 libs: [
397 "releasetools_common",
398 ],
Tao Bao3c7b2a62019-08-07 12:24:20 -0700399 required: [
400 "delta_generator",
401 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000402 target: {
403 darwin: {
404 // required module "delta_generator" is disabled on darwin
405 enabled: false,
406 },
407 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700408}
409
410python_binary_host {
411 name: "check_target_files_signatures",
412 defaults: ["releasetools_binary_defaults"],
413 srcs: [
414 "check_target_files_signatures.py",
415 ],
416 libs: [
417 "releasetools_common",
418 ],
419 required: [
Elliott Hughes16a5cac2021-05-14 15:27:23 -0700420 "aapt2",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700421 ],
422}
423
424python_binary_host {
Yifan Honge3ba82c2019-08-21 13:29:30 -0700425 name: "check_target_files_vintf",
426 defaults: [
427 "releasetools_binary_defaults",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700428 "releasetools_check_target_files_vintf_defaults",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700429 ],
430}
431
432python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700433 name: "img_from_target_files",
434 defaults: [
435 "releasetools_binary_defaults",
436 "releasetools_img_from_target_files_defaults",
437 ],
Tao Bao30e31142019-04-09 00:12:30 -0700438}
439
Daniel Normanb8d52a22020-10-26 17:55:00 -0700440python_defaults {
441 name: "releasetools_find_shareduid_violation_defaults",
442 srcs: [
443 "find_shareduid_violation.py",
444 ],
445 libs: [
446 "releasetools_common",
447 ],
448}
449
450python_binary_host {
451 name: "find_shareduid_violation",
452 defaults: [
453 "releasetools_binary_defaults",
454 "releasetools_find_shareduid_violation_defaults",
455 ],
456}
457
458python_library_host {
459 name: "releasetools_find_shareduid_violation",
460 defaults: [
461 "releasetools_find_shareduid_violation_defaults",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700462 ],
463}
464
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700465python_binary_host {
Tao Baoe11a4602019-08-06 23:21:23 -0700466 name: "make_recovery_patch",
467 defaults: ["releasetools_binary_defaults"],
468 srcs: [
469 "make_recovery_patch.py",
470 ],
471 libs: [
472 "releasetools_common",
473 ],
474}
475
476python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700477 name: "ota_from_target_files",
478 defaults: [
479 "releasetools_binary_defaults",
480 "releasetools_ota_from_target_files_defaults",
481 ],
482}
483
484python_binary_host {
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700485 name: "ota_from_raw_img",
486 srcs: [
487 "ota_from_raw_img.py",
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700488 ],
489 main: "ota_from_raw_img.py",
490 defaults: [
491 "releasetools_binary_defaults",
492 ],
493 required: [
494 "delta_generator",
495 ],
496 libs: [
497 "ota_metadata_proto",
498 "releasetools_common",
499 "ota_utils_lib",
500 ],
501}
502
503python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700504 name: "ota_package_parser",
505 defaults: ["releasetools_binary_defaults"],
506 srcs: [
507 "ota_package_parser.py",
508 "rangelib.py",
Tao Bao8821d642019-08-05 12:05:45 -0700509 ],
510}
511
Tao Baoe11a4602019-08-06 23:21:23 -0700512python_binary_host {
513 name: "sparse_img",
514 defaults: ["releasetools_binary_defaults"],
515 srcs: [
516 "rangelib.py",
517 "sparse_img.py",
518 ],
Tao Baoe11a4602019-08-06 23:21:23 -0700519}
520
Tao Bao3c7b2a62019-08-07 12:24:20 -0700521python_binary_host {
522 name: "sign_apex",
523 defaults: ["releasetools_binary_defaults"],
524 srcs: [
525 "sign_apex.py",
526 ],
527 libs: [
528 "releasetools_apex_utils",
529 "releasetools_common",
530 ],
531}
532
533python_binary_host {
534 name: "sign_target_files_apks",
535 defaults: ["releasetools_binary_defaults"],
536 srcs: [
537 "sign_target_files_apks.py",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700538 "ota_from_raw_img.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700539 ],
540 libs: [
541 "releasetools_add_img_to_target_files",
542 "releasetools_apex_utils",
543 "releasetools_common",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700544 "ota_metadata_proto",
545 "ota_utils_lib",
Kelvin Zhang065c5f52024-09-05 17:49:41 +0000546 "update_payload",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700547 ],
548}
549
550python_binary_host {
551 name: "validate_target_files",
552 defaults: ["releasetools_binary_defaults"],
553 srcs: [
554 "validate_target_files.py",
555 ],
556 libs: [
557 "releasetools_common",
558 ],
559}
560
Jiyong Parkb92b8f42021-03-15 23:13:42 +0900561python_binary_host {
562 name: "verity_utils",
563 defaults: ["releasetools_binary_defaults"],
564 srcs: [
565 "verity_utils.py",
566 ],
567 libs: [
568 "releasetools_common",
569 ],
570 required: [
571 "append2simg",
572 "build_verity_metadata",
573 "build_verity_tree",
574 "fec",
575 ],
576}
577
Inseob Kim2d034932021-12-13 14:04:00 +0900578python_binary_host {
Inseob Kim135c1f12022-01-06 17:22:07 +0900579 name: "fsverity_metadata_generator",
Inseob Kim293112d2022-02-16 11:22:03 +0900580 defaults: ["releasetools_binary_defaults"],
Inseob Kim135c1f12022-01-06 17:22:07 +0900581 srcs: [
582 "fsverity_metadata_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900583 ],
584 required: [
585 "fsverity",
586 ],
587}
588
Tao Bao3c7b2a62019-08-07 12:24:20 -0700589//
590// Tests.
591//
592
Tao Baoca82fc92019-05-01 21:58:03 -0700593python_defaults {
594 name: "releasetools_test_defaults",
Tao Bao30e31142019-04-09 00:12:30 -0700595 srcs: [
Tao Bao2bbb07c2019-05-07 13:12:21 -0700596 "check_ota_package_signature.py",
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000597 "check_partition_sizes.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700598 "check_target_files_signatures.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700599 "make_recovery_patch.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700600 "ota_package_parser.py",
601 "sign_apex.py",
602 "sign_target_files_apks.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700603 "validate_target_files.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700604 "merge_ota.py",
Daniel Norman2b0b9ca2022-03-02 16:12:08 -0800605 ":releasetools_merge_sources",
606 ":releasetools_merge_tests",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700607
Tao Bao30e31142019-04-09 00:12:30 -0700608 "test_*.py",
609 ],
610 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700611 "releasetools_add_img_to_target_files",
612 "releasetools_apex_utils",
613 "releasetools_build_image",
Tao Bao005305a2019-08-05 13:00:44 -0700614 "releasetools_build_super_image",
Yifan Hongccb86fe2019-08-22 15:52:26 -0700615 "releasetools_check_target_files_vintf",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700616 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700617 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700618 "releasetools_img_from_target_files",
619 "releasetools_ota_from_target_files",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700620 "releasetools_verity_utils",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700621 "update_payload",
Tao Bao30e31142019-04-09 00:12:30 -0700622 ],
623 data: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700624 "testdata/**/*",
Cole Faust27f5e692024-10-22 16:30:54 -0700625 ],
626 device_common_data: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000627 ":com.android.apex.compressed.v1",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700628 ":com.android.apex.vendor.foo.with_vintf",
Tao Bao30e31142019-04-09 00:12:30 -0700629 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000630 target: {
631 darwin: {
632 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
633 enabled: false,
634 },
635 },
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000636 required: [
Jooyung Hanccec6ad2023-08-29 10:16:31 +0900637 "apexd_host",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000638 "deapexer",
639 ],
Tao Baoca82fc92019-05-01 21:58:03 -0700640}
641
642python_test_host {
643 name: "releasetools_test",
644 defaults: ["releasetools_test_defaults"],
645 main: "test_utils.py",
Cole Faustc76931f2021-11-04 16:59:39 -0700646 // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from
647 // host, because the test executable won't be able to find the needed libs via its
648 // runpath.
Julien Desprez6d9e78f2020-12-21 13:56:05 -0800649 test_options: {
650 unit_test: true,
651 },
Tao Bao30e31142019-04-09 00:12:30 -0700652}
Herbert Xue4c0faf02025-03-18 14:56:15 +0800653
654genrule {
655 name: "otatools_package_releasetools",
656 tools: ["soong_zip"],
657 srcs: ["**/*"],
658 cmd: "find build/make/tools/releasetools -name '*.pyc' -prune -o \\( -type f -o -type l \\) -print | sort > $(genDir)/files.txt && " +
659 "$(location soong_zip) -o $(out) -C build/make/tools -l $(genDir)/files.txt",
660 out: ["otatools_package_releasetools.zip"],
661}