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