Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 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 | |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 15 | // |
| 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 Badour | 0390580 | 2021-02-12 21:42:54 -0800 | [diff] [blame] | 25 | package { |
| 26 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 27 | } |
| 28 | |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 29 | python_defaults { |
| 30 | name: "releasetools_add_img_to_target_files_defaults", |
| 31 | srcs: [ |
| 32 | "add_img_to_target_files.py", |
| 33 | ], |
| 34 | libs: [ |
Kelvin Zhang | 5f0fcee | 2021-01-19 15:30:46 -0500 | [diff] [blame] | 35 | "ota_metadata_proto", |
| 36 | "releasetools_apex_utils", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 37 | "releasetools_build_image", |
| 38 | "releasetools_build_super_image", |
| 39 | "releasetools_common", |
| 40 | ], |
| 41 | required: [ |
| 42 | "care_map_generator", |
| 43 | ], |
| 44 | } |
| 45 | |
| 46 | python_defaults { |
| 47 | name: "releasetools_build_image_defaults", |
| 48 | srcs: [ |
| 49 | "build_image.py", |
| 50 | ], |
| 51 | libs: [ |
| 52 | "releasetools_common", |
Inseob Kim | 9cda397 | 2021-10-12 22:59:12 +0900 | [diff] [blame] | 53 | "releasetools_fsverity_metadata_generator", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 54 | "releasetools_verity_utils", |
| 55 | ], |
| 56 | required: [ |
| 57 | "blk_alloc_to_base_fs", |
| 58 | "e2fsck", |
David Anderson | 94ad5bb | 2022-03-04 10:57:58 -0800 | [diff] [blame] | 59 | "fsck.erofs", |
| 60 | "img2simg", |
| 61 | "mkfs.erofs", |
Yifan Hong | 7702345 | 2020-08-25 16:15:16 -0700 | [diff] [blame] | 62 | "mkuserimg_mke2fs", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 63 | "simg2img", |
| 64 | "tune2fs", |
Jaegeuk Kim | 1f50a36 | 2021-06-08 18:24:46 -0700 | [diff] [blame] | 65 | "mkf2fsuserimg.sh", |
| 66 | "fsck.f2fs", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 67 | ], |
| 68 | } |
| 69 | |
| 70 | python_defaults { |
| 71 | name: "releasetools_build_super_image_defaults", |
| 72 | srcs: [ |
| 73 | "build_super_image.py", |
| 74 | ], |
| 75 | libs: [ |
| 76 | "releasetools_common", |
| 77 | ], |
| 78 | } |
| 79 | |
| 80 | python_defaults { |
| 81 | name: "releasetools_img_from_target_files_defaults", |
| 82 | srcs: [ |
| 83 | "img_from_target_files.py", |
| 84 | ], |
| 85 | libs: [ |
| 86 | "releasetools_build_super_image", |
| 87 | "releasetools_common", |
| 88 | ], |
| 89 | } |
| 90 | |
| 91 | python_defaults { |
Yifan Hong | e3ba82c | 2019-08-21 13:29:30 -0700 | [diff] [blame] | 92 | name: "releasetools_check_target_files_vintf_defaults", |
| 93 | srcs: [ |
| 94 | "check_target_files_vintf.py", |
| 95 | ], |
| 96 | libs: [ |
| 97 | "releasetools_common", |
| 98 | ], |
| 99 | required: [ |
| 100 | "checkvintf", |
| 101 | ], |
| 102 | } |
| 103 | |
Tianjie | a207613 | 2020-08-19 17:25:32 -0700 | [diff] [blame] | 104 | python_library_host { |
| 105 | name: "ota_metadata_proto", |
Tianjie | a207613 | 2020-08-19 17:25:32 -0700 | [diff] [blame] | 106 | srcs: [ |
| 107 | "ota_metadata.proto", |
| 108 | ], |
| 109 | proto: { |
| 110 | canonical_path_from_root: false, |
| 111 | }, |
| 112 | } |
| 113 | |
Kelvin Zhang | a3a74b6 | 2021-05-14 17:18:43 -0400 | [diff] [blame] | 114 | cc_library_static { |
| 115 | name: "ota_metadata_proto_cc", |
| 116 | srcs: [ |
| 117 | "ota_metadata.proto", |
| 118 | ], |
| 119 | host_supported: true, |
| 120 | recovery_available: true, |
| 121 | proto: { |
| 122 | canonical_path_from_root: false, |
| 123 | type: "lite", |
| 124 | export_proto_headers: true, |
| 125 | }, |
| 126 | } |
| 127 | |
Kelvin Zhang | 2b6a9c3 | 2021-04-12 17:24:26 -0400 | [diff] [blame] | 128 | java_library_static { |
| 129 | name: "ota_metadata_proto_java", |
| 130 | host_supported: true, |
| 131 | proto: { |
| 132 | type: "nano", |
| 133 | }, |
| 134 | srcs: ["ota_metadata.proto"], |
| 135 | sdk_version: "9", |
| 136 | target: { |
| 137 | android: { |
| 138 | jarjar_rules: "jarjar-rules.txt", |
| 139 | }, |
| 140 | host: { |
| 141 | static_libs: ["libprotobuf-java-nano"], |
| 142 | }, |
| 143 | }, |
| 144 | visibility: ["//frameworks/base:__subpackages__"] |
| 145 | } |
| 146 | |
Yifan Hong | e3ba82c | 2019-08-21 13:29:30 -0700 | [diff] [blame] | 147 | python_defaults { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 148 | name: "releasetools_ota_from_target_files_defaults", |
| 149 | srcs: [ |
| 150 | "edify_generator.py", |
Kelvin Zhang | cff4d76 | 2020-07-29 16:37:51 -0400 | [diff] [blame] | 151 | "non_ab_ota.py", |
Tianjie | a207613 | 2020-08-19 17:25:32 -0700 | [diff] [blame] | 152 | "ota_from_target_files.py", |
Kelvin Zhang | cff4d76 | 2020-07-29 16:37:51 -0400 | [diff] [blame] | 153 | "ota_utils.py", |
Tianjie | a207613 | 2020-08-19 17:25:32 -0700 | [diff] [blame] | 154 | "target_files_diff.py", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 155 | ], |
| 156 | libs: [ |
Tianjie | a207613 | 2020-08-19 17:25:32 -0700 | [diff] [blame] | 157 | "ota_metadata_proto", |
Yifan Hong | 9276cf0 | 2019-08-21 16:37:04 -0700 | [diff] [blame] | 158 | "releasetools_check_target_files_vintf", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 159 | "releasetools_common", |
| 160 | "releasetools_verity_utils", |
Mohammad Samiul Islam | 9fd5886 | 2021-01-06 13:33:25 +0000 | [diff] [blame] | 161 | "apex_manifest", |
Kelvin Zhang | 766eea7 | 2021-06-03 09:36:08 -0400 | [diff] [blame] | 162 | "care_map_proto_py", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 163 | ], |
| 164 | required: [ |
| 165 | "brillo_update_payload", |
Yifan Hong | 0929855 | 2019-09-04 11:49:01 -0700 | [diff] [blame] | 166 | "checkvintf", |
Yi-Yo Chiang | 36054e2 | 2022-01-08 22:29:30 +0800 | [diff] [blame] | 167 | "generate_gki_certificate", |
jiajia tang | f3f842b | 2021-03-17 21:49:44 +0800 | [diff] [blame] | 168 | "minigzip", |
Yifan Hong | 125d0b6 | 2020-09-24 17:07:03 -0700 | [diff] [blame] | 169 | "lz4", |
| 170 | "toybox", |
Mohammad Samiul Islam | 9fd5886 | 2021-01-06 13:33:25 +0000 | [diff] [blame] | 171 | "unpack_bootimg", |
| 172 | "deapexer", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 173 | ], |
Yo Chiang | 096c515 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 174 | target: { |
| 175 | darwin: { |
| 176 | // required module "brillo_update_payload" is disabled on darwin |
| 177 | enabled: false, |
| 178 | }, |
| 179 | }, |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 180 | } |
| 181 | |
| 182 | // |
| 183 | // Host libraries. |
| 184 | // |
| 185 | |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 186 | python_library_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 187 | name: "releasetools_add_img_to_target_files", |
| 188 | defaults: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 189 | "releasetools_add_img_to_target_files_defaults", |
| 190 | ], |
| 191 | } |
| 192 | |
| 193 | python_library_host { |
| 194 | name: "releasetools_apex_utils", |
Tao Bao | 005305a | 2019-08-05 13:00:44 -0700 | [diff] [blame] | 195 | srcs: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 196 | "apex_utils.py", |
| 197 | ], |
| 198 | libs: [ |
Mohammad Samiul Islam | 9fd5886 | 2021-01-06 13:33:25 +0000 | [diff] [blame] | 199 | "apex_manifest", |
| 200 | "ota_metadata_proto", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 201 | "releasetools_common", |
| 202 | ], |
| 203 | } |
| 204 | |
| 205 | python_library_host { |
| 206 | name: "releasetools_build_image", |
| 207 | defaults: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 208 | "releasetools_build_image_defaults", |
| 209 | ], |
| 210 | } |
| 211 | |
| 212 | python_library_host { |
| 213 | name: "releasetools_build_super_image", |
| 214 | defaults: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 215 | "releasetools_build_super_image_defaults", |
Tao Bao | 005305a | 2019-08-05 13:00:44 -0700 | [diff] [blame] | 216 | ], |
| 217 | } |
| 218 | |
| 219 | python_library_host { |
Yifan Hong | ccb86fe | 2019-08-22 15:52:26 -0700 | [diff] [blame] | 220 | name: "releasetools_check_target_files_vintf", |
| 221 | defaults: [ |
Yifan Hong | ccb86fe | 2019-08-22 15:52:26 -0700 | [diff] [blame] | 222 | "releasetools_check_target_files_vintf_defaults", |
| 223 | ], |
| 224 | } |
| 225 | |
| 226 | python_library_host { |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 227 | name: "releasetools_common", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 228 | srcs: [ |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 229 | "blockimgdiff.py", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 230 | "common.py", |
Tianjie Xu | 41976c7 | 2019-07-03 13:57:01 -0700 | [diff] [blame] | 231 | "images.py", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 232 | "rangelib.py", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 233 | "sparse_img.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 234 | ], |
| 235 | // Only the tools that are referenced directly are listed as required modules. For example, |
| 236 | // `avbtool` is not here, as the script always uses the one from info_dict['avb_avbtool']. |
| 237 | required: [ |
changho.shin | 0f12536 | 2019-07-08 10:59:00 +0900 | [diff] [blame] | 238 | "aapt2", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 239 | "boot_signer", |
| 240 | "brotli", |
| 241 | "bsdiff", |
Yi-Yo Chiang | 36054e2 | 2022-01-08 22:29:30 +0800 | [diff] [blame] | 242 | "generate_gki_certificate", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 243 | "imgdiff", |
| 244 | "minigzip", |
J. Avila | 98cd4cc | 2020-06-10 20:09:10 +0000 | [diff] [blame] | 245 | "lz4", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 246 | "mkbootfs", |
Luca Stefani | 3e4b448 | 2020-03-27 14:00:23 +0100 | [diff] [blame] | 247 | "signapk", |
Yifan Hong | 14a8712 | 2021-01-12 13:26:25 -0800 | [diff] [blame] | 248 | "toybox", |
| 249 | "unpack_bootimg", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 250 | ], |
| 251 | } |
| 252 | |
| 253 | python_library_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 254 | name: "releasetools_img_from_target_files", |
| 255 | defaults: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 256 | "releasetools_img_from_target_files_defaults", |
| 257 | ], |
| 258 | } |
| 259 | |
| 260 | python_library_host { |
| 261 | name: "releasetools_ota_from_target_files", |
| 262 | defaults: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 263 | "releasetools_ota_from_target_files_defaults", |
| 264 | ], |
| 265 | } |
| 266 | |
| 267 | python_library_host { |
Inseob Kim | 9cda397 | 2021-10-12 22:59:12 +0900 | [diff] [blame] | 268 | name: "releasetools_fsverity_metadata_generator", |
| 269 | srcs: [ |
| 270 | "fsverity_metadata_generator.py", |
| 271 | ], |
Inseob Kim | f69346e | 2021-10-13 15:16:33 +0900 | [diff] [blame] | 272 | libs: [ |
| 273 | "fsverity_digests_proto_python", |
Inseob Kim | 9cda397 | 2021-10-12 22:59:12 +0900 | [diff] [blame] | 274 | ], |
| 275 | } |
| 276 | |
| 277 | python_library_host { |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 278 | name: "releasetools_verity_utils", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 279 | srcs: [ |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 280 | "verity_utils.py", |
| 281 | ], |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 282 | required: [ |
| 283 | "append2simg", |
| 284 | "build_verity_metadata", |
| 285 | "build_verity_tree", |
| 286 | "fec", |
| 287 | ], |
| 288 | } |
| 289 | |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 290 | // |
| 291 | // Host binaries. |
| 292 | // |
| 293 | |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 294 | python_defaults { |
| 295 | name: "releasetools_binary_defaults", |
| 296 | version: { |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 297 | py3: { |
Cole Faust | c76931f | 2021-11-04 16:59:39 -0700 | [diff] [blame] | 298 | embedded_launcher: true, |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 299 | }, |
| 300 | }, |
Kiyoung Kim | 0a8d262 | 2020-03-24 09:36:03 +0900 | [diff] [blame] | 301 | // TODO (b/140144201) Build imgdiff from releasetools_common |
| 302 | required: [ |
| 303 | "aapt2", |
| 304 | "boot_signer", |
| 305 | "brotli", |
| 306 | "bsdiff", |
Mohammad Samiul Islam | f4909b4 | 2021-02-01 20:43:41 +0000 | [diff] [blame] | 307 | "deapexer", |
Yi-Yo Chiang | 36054e2 | 2022-01-08 22:29:30 +0800 | [diff] [blame] | 308 | "generate_gki_certificate", |
Kiyoung Kim | 0a8d262 | 2020-03-24 09:36:03 +0900 | [diff] [blame] | 309 | "imgdiff", |
| 310 | "minigzip", |
Luca Stefani | e0fc4ca | 2020-09-12 06:08:16 +0000 | [diff] [blame] | 311 | "lz4", |
Kiyoung Kim | 0a8d262 | 2020-03-24 09:36:03 +0900 | [diff] [blame] | 312 | "mkbootfs", |
Luca Stefani | e0fc4ca | 2020-09-12 06:08:16 +0000 | [diff] [blame] | 313 | "signapk", |
Yifan Hong | 14a8712 | 2021-01-12 13:26:25 -0800 | [diff] [blame] | 314 | "toybox", |
| 315 | "unpack_bootimg", |
Kiyoung Kim | 0a8d262 | 2020-03-24 09:36:03 +0900 | [diff] [blame] | 316 | ], |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 317 | } |
| 318 | |
| 319 | python_binary_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 320 | name: "add_img_to_target_files", |
| 321 | defaults: [ |
| 322 | "releasetools_binary_defaults", |
| 323 | "releasetools_add_img_to_target_files_defaults", |
| 324 | ], |
| 325 | } |
| 326 | |
| 327 | python_binary_host { |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 328 | name: "build_image", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 329 | defaults: [ |
| 330 | "releasetools_binary_defaults", |
| 331 | "releasetools_build_image_defaults", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 332 | ], |
| 333 | } |
| 334 | |
| 335 | python_binary_host { |
| 336 | name: "build_super_image", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 337 | defaults: [ |
| 338 | "releasetools_binary_defaults", |
| 339 | "releasetools_build_super_image_defaults", |
| 340 | ], |
| 341 | } |
| 342 | |
| 343 | python_binary_host { |
Yifan Hong | 3a7c2ef | 2019-11-01 18:23:19 +0000 | [diff] [blame] | 344 | name: "check_partition_sizes", |
| 345 | srcs: [ |
| 346 | "check_partition_sizes.py", |
| 347 | ], |
| 348 | libs: [ |
| 349 | "releasetools_common", |
| 350 | ], |
| 351 | defaults: [ |
| 352 | "releasetools_binary_defaults", |
| 353 | ], |
| 354 | } |
| 355 | |
| 356 | python_binary_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 357 | name: "check_ota_package_signature", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 358 | defaults: ["releasetools_binary_defaults"], |
| 359 | srcs: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 360 | "check_ota_package_signature.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 361 | ], |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 362 | libs: [ |
| 363 | "releasetools_common", |
| 364 | ], |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 365 | required: [ |
| 366 | "delta_generator", |
| 367 | ], |
Yo Chiang | 096c515 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 368 | target: { |
| 369 | darwin: { |
| 370 | // required module "delta_generator" is disabled on darwin |
| 371 | enabled: false, |
| 372 | }, |
| 373 | }, |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 374 | } |
| 375 | |
| 376 | python_binary_host { |
| 377 | name: "check_target_files_signatures", |
| 378 | defaults: ["releasetools_binary_defaults"], |
| 379 | srcs: [ |
| 380 | "check_target_files_signatures.py", |
| 381 | ], |
| 382 | libs: [ |
| 383 | "releasetools_common", |
| 384 | ], |
| 385 | required: [ |
Elliott Hughes | 16a5cac | 2021-05-14 15:27:23 -0700 | [diff] [blame] | 386 | "aapt2", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 387 | ], |
| 388 | } |
| 389 | |
| 390 | python_binary_host { |
Yifan Hong | e3ba82c | 2019-08-21 13:29:30 -0700 | [diff] [blame] | 391 | name: "check_target_files_vintf", |
| 392 | defaults: [ |
| 393 | "releasetools_binary_defaults", |
| 394 | "releasetools_check_target_files_vintf_defaults" |
| 395 | ], |
| 396 | } |
| 397 | |
| 398 | python_binary_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 399 | name: "img_from_target_files", |
| 400 | defaults: [ |
| 401 | "releasetools_binary_defaults", |
| 402 | "releasetools_img_from_target_files_defaults", |
| 403 | ], |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 404 | } |
| 405 | |
Daniel Norman | b8d52a2 | 2020-10-26 17:55:00 -0700 | [diff] [blame] | 406 | python_defaults { |
| 407 | name: "releasetools_find_shareduid_violation_defaults", |
| 408 | srcs: [ |
| 409 | "find_shareduid_violation.py", |
| 410 | ], |
| 411 | libs: [ |
| 412 | "releasetools_common", |
| 413 | ], |
| 414 | } |
| 415 | |
| 416 | python_binary_host { |
| 417 | name: "find_shareduid_violation", |
| 418 | defaults: [ |
| 419 | "releasetools_binary_defaults", |
| 420 | "releasetools_find_shareduid_violation_defaults", |
| 421 | ], |
| 422 | } |
| 423 | |
| 424 | python_library_host { |
| 425 | name: "releasetools_find_shareduid_violation", |
| 426 | defaults: [ |
| 427 | "releasetools_find_shareduid_violation_defaults", |
Daniel Norman | b8d52a2 | 2020-10-26 17:55:00 -0700 | [diff] [blame] | 428 | ], |
| 429 | } |
| 430 | |
Daniel Norman | bfc51ef | 2019-07-24 14:34:54 -0700 | [diff] [blame] | 431 | python_binary_host { |
Tao Bao | e11a460 | 2019-08-06 23:21:23 -0700 | [diff] [blame] | 432 | name: "make_recovery_patch", |
| 433 | defaults: ["releasetools_binary_defaults"], |
| 434 | srcs: [ |
| 435 | "make_recovery_patch.py", |
| 436 | ], |
| 437 | libs: [ |
| 438 | "releasetools_common", |
| 439 | ], |
| 440 | } |
| 441 | |
| 442 | python_binary_host { |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 443 | name: "ota_from_target_files", |
| 444 | defaults: [ |
| 445 | "releasetools_binary_defaults", |
| 446 | "releasetools_ota_from_target_files_defaults", |
| 447 | ], |
| 448 | } |
| 449 | |
| 450 | python_binary_host { |
| 451 | name: "ota_package_parser", |
| 452 | defaults: ["releasetools_binary_defaults"], |
| 453 | srcs: [ |
| 454 | "ota_package_parser.py", |
| 455 | "rangelib.py", |
Tao Bao | 8821d64 | 2019-08-05 12:05:45 -0700 | [diff] [blame] | 456 | ], |
| 457 | } |
| 458 | |
Tao Bao | e11a460 | 2019-08-06 23:21:23 -0700 | [diff] [blame] | 459 | python_binary_host { |
| 460 | name: "sparse_img", |
| 461 | defaults: ["releasetools_binary_defaults"], |
| 462 | srcs: [ |
| 463 | "rangelib.py", |
| 464 | "sparse_img.py", |
| 465 | ], |
Tao Bao | e11a460 | 2019-08-06 23:21:23 -0700 | [diff] [blame] | 466 | } |
| 467 | |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 468 | python_binary_host { |
| 469 | name: "sign_apex", |
| 470 | defaults: ["releasetools_binary_defaults"], |
| 471 | srcs: [ |
| 472 | "sign_apex.py", |
| 473 | ], |
| 474 | libs: [ |
| 475 | "releasetools_apex_utils", |
| 476 | "releasetools_common", |
| 477 | ], |
| 478 | } |
| 479 | |
| 480 | python_binary_host { |
| 481 | name: "sign_target_files_apks", |
| 482 | defaults: ["releasetools_binary_defaults"], |
| 483 | srcs: [ |
| 484 | "sign_target_files_apks.py", |
| 485 | ], |
| 486 | libs: [ |
| 487 | "releasetools_add_img_to_target_files", |
| 488 | "releasetools_apex_utils", |
| 489 | "releasetools_common", |
| 490 | ], |
| 491 | } |
| 492 | |
| 493 | python_binary_host { |
| 494 | name: "validate_target_files", |
| 495 | defaults: ["releasetools_binary_defaults"], |
| 496 | srcs: [ |
| 497 | "validate_target_files.py", |
| 498 | ], |
| 499 | libs: [ |
| 500 | "releasetools_common", |
| 501 | ], |
| 502 | } |
| 503 | |
Jiyong Park | b92b8f4 | 2021-03-15 23:13:42 +0900 | [diff] [blame] | 504 | python_binary_host { |
| 505 | name: "verity_utils", |
| 506 | defaults: ["releasetools_binary_defaults"], |
| 507 | srcs: [ |
| 508 | "verity_utils.py", |
| 509 | ], |
| 510 | libs: [ |
| 511 | "releasetools_common", |
| 512 | ], |
| 513 | required: [ |
| 514 | "append2simg", |
| 515 | "build_verity_metadata", |
| 516 | "build_verity_tree", |
| 517 | "fec", |
| 518 | ], |
| 519 | } |
| 520 | |
Inseob Kim | 2d03493 | 2021-12-13 14:04:00 +0900 | [diff] [blame] | 521 | python_binary_host { |
Inseob Kim | 135c1f1 | 2022-01-06 17:22:07 +0900 | [diff] [blame] | 522 | name: "fsverity_manifest_generator", |
Inseob Kim | 293112d | 2022-02-16 11:22:03 +0900 | [diff] [blame] | 523 | defaults: ["releasetools_binary_defaults"], |
Inseob Kim | 2d03493 | 2021-12-13 14:04:00 +0900 | [diff] [blame] | 524 | srcs: [ |
Inseob Kim | 135c1f1 | 2022-01-06 17:22:07 +0900 | [diff] [blame] | 525 | "fsverity_manifest_generator.py", |
Inseob Kim | 2d03493 | 2021-12-13 14:04:00 +0900 | [diff] [blame] | 526 | ], |
| 527 | libs: [ |
| 528 | "fsverity_digests_proto_python", |
Inseob Kim | 135c1f1 | 2022-01-06 17:22:07 +0900 | [diff] [blame] | 529 | "releasetools_common", |
| 530 | ], |
| 531 | required: [ |
| 532 | "aapt2", |
| 533 | "apksigner", |
| 534 | "fsverity", |
| 535 | ], |
| 536 | } |
| 537 | |
| 538 | python_binary_host { |
| 539 | name: "fsverity_metadata_generator", |
Inseob Kim | 293112d | 2022-02-16 11:22:03 +0900 | [diff] [blame] | 540 | defaults: ["releasetools_binary_defaults"], |
Inseob Kim | 135c1f1 | 2022-01-06 17:22:07 +0900 | [diff] [blame] | 541 | srcs: [ |
| 542 | "fsverity_metadata_generator.py", |
Inseob Kim | 2d03493 | 2021-12-13 14:04:00 +0900 | [diff] [blame] | 543 | ], |
| 544 | required: [ |
| 545 | "fsverity", |
| 546 | ], |
| 547 | } |
| 548 | |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 549 | // |
| 550 | // Tests. |
| 551 | // |
| 552 | |
Tao Bao | ca82fc9 | 2019-05-01 21:58:03 -0700 | [diff] [blame] | 553 | python_defaults { |
| 554 | name: "releasetools_test_defaults", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 555 | srcs: [ |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 556 | "check_ota_package_signature.py", |
Yifan Hong | 3a7c2ef | 2019-11-01 18:23:19 +0000 | [diff] [blame] | 557 | "check_partition_sizes.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 558 | "check_target_files_signatures.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 559 | "make_recovery_patch.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 560 | "ota_package_parser.py", |
| 561 | "sign_apex.py", |
| 562 | "sign_target_files_apks.py", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 563 | "validate_target_files.py", |
Daniel Norman | 2b0b9ca | 2022-03-02 16:12:08 -0800 | [diff] [blame] | 564 | ":releasetools_merge_sources", |
| 565 | ":releasetools_merge_tests", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 566 | |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 567 | "test_*.py", |
| 568 | ], |
| 569 | libs: [ |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 570 | "releasetools_add_img_to_target_files", |
| 571 | "releasetools_apex_utils", |
| 572 | "releasetools_build_image", |
Tao Bao | 005305a | 2019-08-05 13:00:44 -0700 | [diff] [blame] | 573 | "releasetools_build_super_image", |
Yifan Hong | ccb86fe | 2019-08-22 15:52:26 -0700 | [diff] [blame] | 574 | "releasetools_check_target_files_vintf", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 575 | "releasetools_common", |
Daniel Norman | b8d52a2 | 2020-10-26 17:55:00 -0700 | [diff] [blame] | 576 | "releasetools_find_shareduid_violation", |
Tao Bao | 3c7b2a6 | 2019-08-07 12:24:20 -0700 | [diff] [blame] | 577 | "releasetools_img_from_target_files", |
| 578 | "releasetools_ota_from_target_files", |
Tao Bao | 2bbb07c | 2019-05-07 13:12:21 -0700 | [diff] [blame] | 579 | "releasetools_verity_utils", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 580 | ], |
| 581 | data: [ |
Yifan Hong | ccb86fe | 2019-08-22 15:52:26 -0700 | [diff] [blame] | 582 | "testdata/**/*", |
Mohammad Samiul Islam | 9fd5886 | 2021-01-06 13:33:25 +0000 | [diff] [blame] | 583 | ":com.android.apex.compressed.v1", |
| 584 | ":com.android.apex.compressed.v1_original", |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 585 | ], |
Yo Chiang | 096c515 | 2020-08-07 04:22:18 +0000 | [diff] [blame] | 586 | target: { |
| 587 | darwin: { |
| 588 | // libs dep "releasetools_ota_from_target_files" is disabled on darwin |
| 589 | enabled: false, |
| 590 | }, |
| 591 | }, |
Mohammad Samiul Islam | 9fd5886 | 2021-01-06 13:33:25 +0000 | [diff] [blame] | 592 | required: [ |
| 593 | "deapexer", |
| 594 | ], |
Tao Bao | ca82fc9 | 2019-05-01 21:58:03 -0700 | [diff] [blame] | 595 | } |
| 596 | |
| 597 | python_test_host { |
| 598 | name: "releasetools_test", |
| 599 | defaults: ["releasetools_test_defaults"], |
| 600 | main: "test_utils.py", |
Cole Faust | c76931f | 2021-11-04 16:59:39 -0700 | [diff] [blame] | 601 | // Don't use embedded_launcher, atest will try (but may fail) to load libc++.so from |
| 602 | // host, because the test executable won't be able to find the needed libs via its |
| 603 | // runpath. |
Julien Desprez | 6d9e78f | 2020-12-21 13:56:05 -0800 | [diff] [blame] | 604 | test_options: { |
| 605 | unit_test: true, |
| 606 | }, |
Tao Bao | 30e3114 | 2019-04-09 00:12:30 -0700 | [diff] [blame] | 607 | } |