blob: e371b2354c9c53a9f4e805cb18bcbed1a6734164 [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",
299 version: {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700300 py3: {
Cole Faustc76931f2021-11-04 16:59:39 -0700301 embedded_launcher: true,
Tao Bao2bbb07c2019-05-07 13:12:21 -0700302 },
303 },
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900304 // TODO (b/140144201) Build imgdiff from releasetools_common
305 required: [
306 "aapt2",
307 "boot_signer",
308 "brotli",
309 "bsdiff",
Mohammad Samiul Islamf4909b42021-02-01 20:43:41 +0000310 "deapexer",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000311 "lz4",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900312 "mkbootfs",
Luca Stefanie0fc4ca2020-09-12 06:08:16 +0000313 "signapk",
Yifan Hong14a87122021-01-12 13:26:25 -0800314 "toybox",
315 "unpack_bootimg",
Kiyoung Kim0a8d2622020-03-24 09:36:03 +0900316 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700317}
318
319python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700320 name: "add_img_to_target_files",
321 defaults: [
322 "releasetools_binary_defaults",
323 "releasetools_add_img_to_target_files_defaults",
324 ],
325}
326
Kelvin Zhang197772f2022-04-26 15:15:11 -0700327python_library_host {
328 name: "ota_utils_lib",
329 srcs: [
330 "ota_utils.py",
331 "payload_signer.py",
Kelvin Zhangb84d2aa2023-11-06 10:53:41 -0800332 "ota_signing_utils.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700333 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700334 libs: [
335 "releasetools_common",
336 ],
Kelvin Zhang197772f2022-04-26 15:15:11 -0700337}
338
339python_binary_host {
340 name: "merge_ota",
341 version: {
342 py3: {
343 embedded_launcher: true,
344 },
345 },
346 srcs: [
347 "merge_ota.py",
348 ],
349 libs: [
350 "ota_metadata_proto",
351 "update_payload",
352 "care_map_proto_py",
353 "releasetools_common",
354 "ota_utils_lib",
355 ],
356}
357
Tao Bao3c7b2a62019-08-07 12:24:20 -0700358python_binary_host {
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700359 name: "create_brick_ota",
360 version: {
361 py3: {
362 embedded_launcher: true,
363 },
364 },
365 srcs: [
366 "create_brick_ota.py",
367 ],
368 libs: [
369 "ota_utils_lib",
370 ],
Kelvin Zhang41d38332024-09-10 14:35:18 -0700371 required: [
372 "signapk",
373 ],
Kelvin Zhangf91d74b2023-03-14 16:46:22 -0700374}
375
376python_binary_host {
Tao Bao2bbb07c2019-05-07 13:12:21 -0700377 name: "build_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700378 defaults: [
379 "releasetools_binary_defaults",
380 "releasetools_build_image_defaults",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700381 ],
382}
383
384python_binary_host {
385 name: "build_super_image",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700386 defaults: [
387 "releasetools_binary_defaults",
388 "releasetools_build_super_image_defaults",
389 ],
390}
391
392python_binary_host {
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000393 name: "check_partition_sizes",
394 srcs: [
395 "check_partition_sizes.py",
396 ],
397 libs: [
398 "releasetools_common",
399 ],
400 defaults: [
401 "releasetools_binary_defaults",
402 ],
403}
404
405python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700406 name: "check_ota_package_signature",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700407 defaults: ["releasetools_binary_defaults"],
408 srcs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700409 "check_ota_package_signature.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700410 ],
Tao Bao2bbb07c2019-05-07 13:12:21 -0700411 libs: [
412 "releasetools_common",
413 ],
Tao Bao3c7b2a62019-08-07 12:24:20 -0700414 required: [
415 "delta_generator",
416 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000417 target: {
418 darwin: {
419 // required module "delta_generator" is disabled on darwin
420 enabled: false,
421 },
422 },
Tao Bao3c7b2a62019-08-07 12:24:20 -0700423}
424
425python_binary_host {
426 name: "check_target_files_signatures",
427 defaults: ["releasetools_binary_defaults"],
428 srcs: [
429 "check_target_files_signatures.py",
430 ],
431 libs: [
432 "releasetools_common",
433 ],
434 required: [
Elliott Hughes16a5cac2021-05-14 15:27:23 -0700435 "aapt2",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700436 ],
437}
438
439python_binary_host {
Yifan Honge3ba82c2019-08-21 13:29:30 -0700440 name: "check_target_files_vintf",
441 defaults: [
442 "releasetools_binary_defaults",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700443 "releasetools_check_target_files_vintf_defaults",
Yifan Honge3ba82c2019-08-21 13:29:30 -0700444 ],
445}
446
447python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700448 name: "img_from_target_files",
449 defaults: [
450 "releasetools_binary_defaults",
451 "releasetools_img_from_target_files_defaults",
452 ],
Tao Bao30e31142019-04-09 00:12:30 -0700453}
454
Daniel Normanb8d52a22020-10-26 17:55:00 -0700455python_defaults {
456 name: "releasetools_find_shareduid_violation_defaults",
457 srcs: [
458 "find_shareduid_violation.py",
459 ],
460 libs: [
461 "releasetools_common",
462 ],
463}
464
465python_binary_host {
466 name: "find_shareduid_violation",
467 defaults: [
468 "releasetools_binary_defaults",
469 "releasetools_find_shareduid_violation_defaults",
470 ],
471}
472
473python_library_host {
474 name: "releasetools_find_shareduid_violation",
475 defaults: [
476 "releasetools_find_shareduid_violation_defaults",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700477 ],
478}
479
Daniel Normanbfc51ef2019-07-24 14:34:54 -0700480python_binary_host {
Tao Baoe11a4602019-08-06 23:21:23 -0700481 name: "make_recovery_patch",
482 defaults: ["releasetools_binary_defaults"],
483 srcs: [
484 "make_recovery_patch.py",
485 ],
486 libs: [
487 "releasetools_common",
488 ],
489}
490
491python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700492 name: "ota_from_target_files",
493 defaults: [
494 "releasetools_binary_defaults",
495 "releasetools_ota_from_target_files_defaults",
496 ],
497}
498
499python_binary_host {
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700500 name: "ota_from_raw_img",
501 srcs: [
502 "ota_from_raw_img.py",
Kelvin Zhangc7441e52023-08-22 08:56:30 -0700503 ],
504 main: "ota_from_raw_img.py",
505 defaults: [
506 "releasetools_binary_defaults",
507 ],
508 required: [
509 "delta_generator",
510 ],
511 libs: [
512 "ota_metadata_proto",
513 "releasetools_common",
514 "ota_utils_lib",
515 ],
516}
517
518python_binary_host {
Tao Bao3c7b2a62019-08-07 12:24:20 -0700519 name: "ota_package_parser",
520 defaults: ["releasetools_binary_defaults"],
521 srcs: [
522 "ota_package_parser.py",
523 "rangelib.py",
Tao Bao8821d642019-08-05 12:05:45 -0700524 ],
525}
526
Tao Baoe11a4602019-08-06 23:21:23 -0700527python_binary_host {
528 name: "sparse_img",
529 defaults: ["releasetools_binary_defaults"],
530 srcs: [
531 "rangelib.py",
532 "sparse_img.py",
533 ],
Tao Baoe11a4602019-08-06 23:21:23 -0700534}
535
Tao Bao3c7b2a62019-08-07 12:24:20 -0700536python_binary_host {
537 name: "sign_apex",
538 defaults: ["releasetools_binary_defaults"],
539 srcs: [
540 "sign_apex.py",
541 ],
542 libs: [
543 "releasetools_apex_utils",
544 "releasetools_common",
545 ],
546}
547
548python_binary_host {
549 name: "sign_target_files_apks",
550 defaults: ["releasetools_binary_defaults"],
551 srcs: [
552 "sign_target_files_apks.py",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700553 "ota_from_raw_img.py",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700554 ],
555 libs: [
556 "releasetools_add_img_to_target_files",
557 "releasetools_apex_utils",
558 "releasetools_common",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700559 "ota_metadata_proto",
560 "ota_utils_lib",
Kelvin Zhang065c5f52024-09-05 17:49:41 +0000561 "update_payload",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700562 ],
563}
564
565python_binary_host {
566 name: "validate_target_files",
567 defaults: ["releasetools_binary_defaults"],
568 srcs: [
569 "validate_target_files.py",
570 ],
571 libs: [
572 "releasetools_common",
573 ],
574}
575
Jiyong Parkb92b8f42021-03-15 23:13:42 +0900576python_binary_host {
577 name: "verity_utils",
578 defaults: ["releasetools_binary_defaults"],
579 srcs: [
580 "verity_utils.py",
581 ],
582 libs: [
583 "releasetools_common",
584 ],
585 required: [
586 "append2simg",
587 "build_verity_metadata",
588 "build_verity_tree",
589 "fec",
590 ],
591}
592
Inseob Kim2d034932021-12-13 14:04:00 +0900593python_binary_host {
Inseob Kim135c1f12022-01-06 17:22:07 +0900594 name: "fsverity_metadata_generator",
Inseob Kim293112d2022-02-16 11:22:03 +0900595 defaults: ["releasetools_binary_defaults"],
Inseob Kim135c1f12022-01-06 17:22:07 +0900596 srcs: [
597 "fsverity_metadata_generator.py",
Inseob Kim2d034932021-12-13 14:04:00 +0900598 ],
599 required: [
600 "fsverity",
601 ],
602}
603
Tao Bao3c7b2a62019-08-07 12:24:20 -0700604//
605// Tests.
606//
607
Tao Baoca82fc92019-05-01 21:58:03 -0700608python_defaults {
609 name: "releasetools_test_defaults",
Tao Bao30e31142019-04-09 00:12:30 -0700610 srcs: [
Tao Bao2bbb07c2019-05-07 13:12:21 -0700611 "check_ota_package_signature.py",
Yifan Hong3a7c2ef2019-11-01 18:23:19 +0000612 "check_partition_sizes.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700613 "check_target_files_signatures.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700614 "make_recovery_patch.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700615 "ota_package_parser.py",
616 "sign_apex.py",
617 "sign_target_files_apks.py",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700618 "validate_target_files.py",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700619 "merge_ota.py",
Daniel Norman2b0b9ca2022-03-02 16:12:08 -0800620 ":releasetools_merge_sources",
621 ":releasetools_merge_tests",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700622
Tao Bao30e31142019-04-09 00:12:30 -0700623 "test_*.py",
624 ],
625 libs: [
Tao Bao3c7b2a62019-08-07 12:24:20 -0700626 "releasetools_add_img_to_target_files",
627 "releasetools_apex_utils",
628 "releasetools_build_image",
Tao Bao005305a2019-08-05 13:00:44 -0700629 "releasetools_build_super_image",
Yifan Hongccb86fe2019-08-22 15:52:26 -0700630 "releasetools_check_target_files_vintf",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700631 "releasetools_common",
Daniel Normanb8d52a22020-10-26 17:55:00 -0700632 "releasetools_find_shareduid_violation",
Tao Bao3c7b2a62019-08-07 12:24:20 -0700633 "releasetools_img_from_target_files",
634 "releasetools_ota_from_target_files",
Tao Bao2bbb07c2019-05-07 13:12:21 -0700635 "releasetools_verity_utils",
Kelvin Zhang197772f2022-04-26 15:15:11 -0700636 "update_payload",
Tao Bao30e31142019-04-09 00:12:30 -0700637 ],
638 data: [
Yifan Hongccb86fe2019-08-22 15:52:26 -0700639 "testdata/**/*",
Cole Faust27f5e692024-10-22 16:30:54 -0700640 ],
641 device_common_data: [
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000642 ":com.android.apex.compressed.v1",
Kelvin Zhangb707ea02024-08-21 10:33:36 -0700643 ":com.android.apex.vendor.foo.with_vintf",
Tao Bao30e31142019-04-09 00:12:30 -0700644 ],
Yo Chiang096c5152020-08-07 04:22:18 +0000645 target: {
646 darwin: {
647 // libs dep "releasetools_ota_from_target_files" is disabled on darwin
648 enabled: false,
649 },
650 },
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000651 required: [
Jooyung Hanccec6ad2023-08-29 10:16:31 +0900652 "apexd_host",
Mohammad Samiul Islam9fd58862021-01-06 13:33:25 +0000653 "deapexer",
654 ],
Tao Baoca82fc92019-05-01 21:58:03 -0700655}
656
657python_test_host {
658 name: "releasetools_test",
659 defaults: ["releasetools_test_defaults"],
660 main: "test_utils.py",
Cole Faustc76931f2021-11-04 16:59:39 -0700661 // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from
662 // host, because the test executable won't be able to find the needed libs via its
663 // runpath.
Julien Desprez6d9e78f2020-12-21 13:56:05 -0800664 test_options: {
665 unit_test: true,
666 },
Tao Bao30e31142019-04-09 00:12:30 -0700667}