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 15// Build rules to build shim apexes. 16 17package { 18 default_applicable_licenses: ["Android-Apache-2.0"], 19} 20 21genrule { 22 name: "com.android.apex.cts.shim.pem", 23 out: ["com.android.apex.cts.shim.pem"], 24 cmd: "openssl genrsa -out $(out) 4096", 25} 26 27genrule { 28 name: "com.android.apex.cts.shim.pubkey", 29 srcs: [":com.android.apex.cts.shim.pem"], 30 out: ["com.android.apex.cts.shim.pubkey"], 31 tools: ["avbtool"], 32 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 33} 34 35apex_key { 36 name: "com.android.apex.cts.shim.key", 37 private_key: ":com.android.apex.cts.shim.pem", 38 public_key: ":com.android.apex.cts.shim.pubkey", 39 installable: false, 40} 41 42genrule { 43 name: "com.android.apex.cts.shim.debug.pem", 44 out: ["com.android.apex.cts.shim.debug.pem"], 45 cmd: "openssl genrsa -out $(out) 4096", 46} 47 48genrule { 49 name: "com.android.apex.cts.shim.debug.pubkey", 50 srcs: [":com.android.apex.cts.shim.debug.pem"], 51 out: ["com.android.apex.cts.shim.debug.pubkey"], 52 tools: ["avbtool"], 53 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 54} 55 56apex_key { 57 name: "com.android.apex.cts.shim.debug.key", 58 private_key: ":com.android.apex.cts.shim.debug.pem", 59 public_key: ":com.android.apex.cts.shim.debug.pubkey", 60 installable: false, 61} 62 63genrule { 64 name: "generate_hash_of_dev_null", 65 out: ["hash.txt"], 66 cmd: "sha512sum -b /dev/null | cut -d' ' -f1 | tee $(out)", 67} 68 69prebuilt_etc { 70 name: "hash_of_dev_null", 71 src: ":generate_hash_of_dev_null", 72 filename: "hash.txt", 73 installable: false, 74} 75 76apex { 77 name: "com.android.apex.cts.shim.v3", 78 manifest: "manifest_v3.json", 79 androidManifest: "AndroidManifest.xml", 80 file_contexts: ":apex.test-file_contexts", 81 key: "com.android.apex.cts.shim.key", 82 prebuilts: ["hash_of_dev_null"], 83 apps: [ 84 "CtsShim", 85 "CtsShimPriv", 86 ], 87 installable: false, 88 allowed_files: "default_shim_allowed_list.txt", 89 updatable: false, 90} 91 92apex { 93 name: "com.android.apex.cts.shim.v2", 94 manifest: "manifest_v2.json", 95 androidManifest: "AndroidManifest.xml", 96 file_contexts: ":apex.test-file_contexts", 97 key: "com.android.apex.cts.shim.key", 98 prebuilts: ["hash_of_dev_null"], 99 apps: [ 100 "CtsShim", 101 "CtsShimPriv", 102 ], 103 installable: false, 104 allowed_files: "default_shim_allowed_list.txt", 105 updatable: false, 106} 107 108apex { 109 name: "com.android.apex.cts.shim.v2_sign_payload_with_different_key", 110 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 111 manifest: "manifest_v2_rebootless.json", 112 androidManifest: "AndroidManifest.xml", 113 file_contexts: ":apex.test-file_contexts", 114 key: "com.android.apex.cts.shim.debug.key", 115 prebuilts: ["hash_of_dev_null"], 116 installable: false, 117 allowed_files: "default_shim_allowed_list.txt", 118 updatable: false, 119} 120 121apex { 122 name: "com.android.apex.cts.shim.v2_without_apk_in_apex", 123 manifest: "manifest_v2.json", 124 androidManifest: "AndroidManifest.xml", 125 file_contexts: ":apex.test-file_contexts", 126 key: "com.android.apex.cts.shim.key", 127 prebuilts: ["hash_of_dev_null"], 128 installable: false, 129 allowed_files: "default_shim_allowed_list.txt", 130 updatable: false, 131} 132 133apex { 134 name: "com.android.apex.cts.shim.v2_unsigned_payload", 135 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 136 manifest: "manifest_v2_rebootless.json", 137 androidManifest: "AndroidManifest.xml", 138 file_contexts: ":apex.test-file_contexts", 139 key: "com.android.apex.cts.shim.key", 140 prebuilts: ["hash_of_dev_null"], 141 apps: [ 142 "CtsShim", 143 "CtsShimPriv", 144 ], 145 installable: false, 146 allowed_files: "default_shim_allowed_list.txt", 147 test_only_unsigned_payload: true, 148 updatable: false, 149} 150 151override_apex { 152 name: "com.android.apex.cts.shim.v2_different_package_name", 153 package_name: "com.android.apex.cts.shim.different", 154 // Use rebootless APEX to re-use this APEX in the rebootless update test case. 155 base: "com.android.apex.cts.shim.v2_rebootless", 156} 157 158genrule { 159 name: "generate_empty_hash", 160 out: ["hash.txt"], 161 cmd: "touch $(out)", 162} 163 164prebuilt_etc { 165 name: "empty_hash", 166 src: ":generate_empty_hash", 167 filename: "hash.txt", 168 installable: false, 169} 170 171// Use empty hash.txt to make sure that this apex has wrong SHA512, hence trying 172// to stage it should fail. 173apex { 174 name: "com.android.apex.cts.shim.v2_wrong_sha", 175 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 176 manifest: "manifest_v2_rebootless.json", 177 androidManifest: "AndroidManifest.xml", 178 file_contexts: ":apex.test-file_contexts", 179 key: "com.android.apex.cts.shim.key", 180 prebuilts: ["empty_hash"], 181 installable: false, 182 updatable: false, 183} 184 185prebuilt_etc { 186 name: "apex_shim_additional_file", 187 src: "additional_file", 188 filename: "additional_file", 189 installable: false, 190} 191 192apex { 193 name: "com.android.apex.cts.shim.v2_additional_file", 194 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 195 manifest: "manifest_v2_rebootless.json", 196 androidManifest: "AndroidManifest.xml", 197 file_contexts: ":apex.test-file_contexts", 198 key: "com.android.apex.cts.shim.key", 199 prebuilts: [ 200 "hash_of_dev_null", 201 "apex_shim_additional_file", 202 ], 203 installable: false, 204 updatable: false, 205} 206 207prebuilt_etc { 208 name: "apex_shim_additional_folder", 209 src: "additional_file", 210 filename: "additional_file", 211 sub_dir: "additional_folder", 212 installable: false, 213} 214 215apex { 216 name: "com.android.apex.cts.shim.v2_additional_folder", 217 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 218 manifest: "manifest_v2_rebootless.json", 219 androidManifest: "AndroidManifest.xml", 220 file_contexts: ":apex.test-file_contexts", 221 key: "com.android.apex.cts.shim.key", 222 prebuilts: [ 223 "hash_of_dev_null", 224 "apex_shim_additional_folder", 225 ], 226 installable: false, 227 updatable: false, 228} 229 230apex { 231 name: "com.android.apex.cts.shim.v2_with_pre_install_hook", 232 manifest: "manifest_v2_with_pre_install_hook.json", 233 androidManifest: "AndroidManifest.xml", 234 file_contexts: ":apex.test-file_contexts", 235 key: "com.android.apex.cts.shim.key", 236 prebuilts: ["hash_of_dev_null"], 237 installable: false, 238 updatable: false, 239} 240 241apex { 242 name: "com.android.apex.cts.shim.v2_with_post_install_hook", 243 manifest: "manifest_v2_with_post_install_hook.json", 244 androidManifest: "AndroidManifest.xml", 245 file_contexts: ":apex.test-file_contexts", 246 key: "com.android.apex.cts.shim.key", 247 prebuilts: ["hash_of_dev_null"], 248 installable: false, 249 updatable: false, 250} 251 252java_genrule { 253 name: "generate_hash_v1", 254 srcs: [ 255 ":com.android.apex.cts.shim.v2", 256 ":com.android.apex.cts.shim.v2_add_apk_to_apex", 257 ":com.android.apex.cts.shim.v2_without_apk_in_apex", 258 ":com.android.apex.cts.shim.v2_additional_file", 259 ":com.android.apex.cts.shim.v2_additional_folder", 260 ":com.android.apex.cts.shim.v2_different_certificate", 261 ":com.android.apex.cts.shim.v2_different_package_name", 262 ":com.android.apex.cts.shim.v2_signed_bob", 263 ":com.android.apex.cts.shim.v2_signed_bob_rot", 264 ":com.android.apex.cts.shim.v2_signed_bob_rot_rollback", 265 ":com.android.apex.cts.shim.v2_with_pre_install_hook", 266 ":com.android.apex.cts.shim.v2_with_post_install_hook", 267 ":com.android.apex.cts.shim.v2_sdk_target_p", 268 ":com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", 269 ":com.android.apex.cts.shim.v2_apk_in_apex_upgrades", 270 ":com.android.apex.cts.shim.v2_rebootless", 271 ":com.android.apex.cts.shim.v2_install_constraints_empty", 272 ":com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", 273 ":com.android.apex.cts.shim.v2_install_constraints_no_value", 274 ":com.android.apex.cts.shim.v3", 275 ":com.android.apex.cts.shim.v3_rebootless", 276 ":com.android.apex.cts.shim.v3_signed_bob", 277 ":com.android.apex.cts.shim.v3_signed_bob_rot", 278 ], 279 out: ["hash.txt"], 280 cmd: "sha512sum -b $(in) | cut -d' ' -f1 | tee $(out)", 281} 282 283prebuilt_etc { 284 name: "hash_v1", 285 src: ":generate_hash_v1", 286 filename: "hash.txt", 287 installable: false, 288} 289 290prebuilt_etc { 291 name: "allowlist", 292 srcs: [ 293 "signature-permission-allowlist.xml", 294 ], 295 sub_dir: "permissions", 296 installable: false, 297} 298 299apex { 300 name: "com.android.apex.cts.shim.v1", 301 manifest: "manifest.json", 302 androidManifest: "AndroidManifest.xml", 303 file_contexts: ":apex.test-file_contexts", 304 key: "com.android.apex.cts.shim.key", 305 prebuilts: [ 306 "hash_v1", 307 "allowlist", 308 ], 309 apps: [ 310 "CtsShim", 311 "CtsShimPriv", 312 ], 313 allowed_files: "default_shim_allowed_list.txt", 314 updatable: false, 315} 316 317genrule { 318 name: "com.android.apex.cts.shim_not_pre_installed.pem", 319 out: ["com.android.apex.cts.shim_not_pre_installed.pem"], 320 cmd: "openssl genrsa -out $(out) 4096", 321} 322 323genrule { 324 name: "com.android.apex.cts.shim_not_pre_installed.pubkey", 325 srcs: [":com.android.apex.cts.shim_not_pre_installed.pem"], 326 out: ["com.android.apex.cts.shim_not_pre_installed.pubkey"], 327 tools: ["avbtool"], 328 cmd: "$(location avbtool) extract_public_key --key $(in) --output $(out)", 329} 330 331apex_key { 332 name: "com.android.apex.cts.shim_not_pre_installed.key", 333 private_key: ":com.android.apex.cts.shim_not_pre_installed.pem", 334 public_key: ":com.android.apex.cts.shim_not_pre_installed.pubkey", 335 installable: false, 336} 337 338apex { 339 name: "com.android.apex.cts.shim_not_pre_installed", 340 manifest: "manifest_not_pre_installed.json", 341 androidManifest: "AndroidManifestNotPreInstalled.xml", 342 file_contexts: ":apex.test-file_contexts", 343 key: "com.android.apex.cts.shim_not_pre_installed.key", 344 prebuilts: ["hash_of_dev_null"], 345 installable: false, 346 updatable: false, 347} 348 349apex { 350 name: "com.android.apex.cts.shim.v2_different_certificate", 351 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 352 manifest: "manifest_v2_rebootless.json", 353 androidManifest: "AndroidManifest.xml", 354 file_contexts: ":apex.test-file_contexts", 355 key: "com.android.apex.cts.shim.key", 356 prebuilts: ["hash_of_dev_null"], 357 installable: false, 358 certificate: ":com.android.apex.cts.shim.debug.cert", 359 updatable: false, 360} 361 362android_app_certificate { 363 name: "com.android.apex.cts.shim.debug.cert", 364 certificate: "com.android.apex.cts.shim.debug.cert", 365} 366 367// Build rules to build shim apex with rotated keys 368 369// We name the original key used to sign cts.shim.v1 package as alice. 370// We then create a second key called bob. The second key bob is used to rotate the 371// original key alice. 372 373// Create private key bob in pem format 374genrule { 375 name: "com.android.apex.rotation.key.bob.pem", 376 out: ["bob.pem"], 377 cmd: "openssl req -x509 -newkey rsa:4096 -nodes -days 999999 -subj '/DN=/[email protected]/CN=Android/OU=Android/O=Android/L=Mountain View/ST=California/C=US' -keyout $(out)", 378} 379 380// Converts bob's private key to pk8 format 381genrule { 382 name: "com.android.apex.rotation.key.bob.pk8", 383 srcs: [":com.android.apex.rotation.key.bob.pem"], 384 out: ["bob.pk8"], 385 cmd: "openssl pkcs8 -topk8 -inform PEM -outform DER -in $(in) -out $(out) -nocrypt", 386} 387 388// Extract bob's public key from its private key 389genrule { 390 name: "com.android.apex.rotation.key.bob.x509.pem", 391 srcs: [":com.android.apex.rotation.key.bob.pem"], 392 out: ["bob.x509.pem"], 393 cmd: "openssl req -x509 -key $(in) -newkey rsa:4096 -nodes -days 999999 -subj '/DN=/[email protected]/CN=Android/OU=Android/O=Android/L=Mountain View/ST=California/C=US' -out $(out)", 394} 395 396// Create lineage file for rotating alice to bob 397genrule { 398 name: "com.android.apex.rotation.key.bob.rot", 399 srcs: [ 400 "alice.pk8", 401 "alice.x509.pem", 402 ":com.android.apex.rotation.key.bob.pk8", 403 ":com.android.apex.rotation.key.bob.x509.pem", 404 ], 405 out: ["bob.rot"], 406 tools: [":apksigner"], 407 cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", 408} 409 410// Create lineage file for rotating alice to bob with rollback capability 411genrule { 412 name: "com.android.apex.rotation.key.bob.rot.rollback", 413 srcs: [ 414 "alice.pk8", 415 "alice.x509.pem", 416 ":com.android.apex.rotation.key.bob.pk8", 417 ":com.android.apex.rotation.key.bob.x509.pem", 418 ], 419 out: ["bob.rot"], 420 tools: [":apksigner"], 421 cmd: "$(location :apksigner) rotate --out $(out) --old-signer --key $(location alice.pk8) --cert $(location alice.x509.pem) --set-rollback true --new-signer --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem)", 422} 423 424// v2 cts shim package signed by bob, without lineage 425java_genrule { 426 name: "com.android.apex.cts.shim.v2_signed_bob", 427 out: ["com.android.apex.cts.shim.v2_signed_bob"], 428 tools: [":apksigner"], 429 srcs: [ 430 ":com.android.apex.cts.shim.v2", 431 ":com.android.apex.rotation.key.bob.x509.pem", 432 ":com.android.apex.rotation.key.bob.pk8", 433 ], 434 dist: { 435 targets: ["com.android.apex.cts.shim.v2_signed_bob"], 436 dest: "com.android.apex.cts.shim.v2_signed_bob.apex", 437 }, 438 cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v2)", 439} 440 441// v2 cts shim package signed by bob + lineage 442java_genrule { 443 name: "com.android.apex.cts.shim.v2_signed_bob_rot", 444 out: ["com.android.apex.cts.shim.v2_signed_bob_rot"], 445 tools: [":apksigner"], 446 srcs: [ 447 ":com.android.apex.cts.shim.v2", 448 ":com.android.apex.rotation.key.bob.x509.pem", 449 ":com.android.apex.rotation.key.bob.pk8", 450 ":com.android.apex.rotation.key.bob.rot", 451 ], 452 dist: { 453 targets: ["com.android.apex.cts.shim.v2_signed_bob_rot"], 454 dest: "com.android.apex.cts.shim.v2_signed_bob_rot.apex", 455 }, 456 cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", 457} 458 459// v2 cts shim package signed by bob + lineage + rollback capability 460java_genrule { 461 name: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback", 462 out: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], 463 tools: [":apksigner"], 464 srcs: [ 465 ":com.android.apex.cts.shim.v2", 466 ":com.android.apex.rotation.key.bob.x509.pem", 467 ":com.android.apex.rotation.key.bob.pk8", 468 ":com.android.apex.rotation.key.bob.rot.rollback", 469 ], 470 dist: { 471 targets: ["com.android.apex.cts.shim.v2_signed_bob_rot_rollback"], 472 dest: "com.android.apex.cts.shim.v2_signed_bob_rot_rollback.apex", 473 }, 474 cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot.rollback) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v2)", 475} 476 477// v3 cts shim package signed by bob 478java_genrule { 479 name: "com.android.apex.cts.shim.v3_signed_bob", 480 out: ["com.android.apex.cts.shim.v3_signed_bob"], 481 tools: [":apksigner"], 482 srcs: [ 483 ":com.android.apex.cts.shim.v3", 484 ":com.android.apex.rotation.key.bob.x509.pem", 485 ":com.android.apex.rotation.key.bob.pk8", 486 ], 487 dist: { 488 targets: ["com.android.apex.cts.shim.v3_signed_bob"], 489 dest: "com.android.apex.cts.shim.v3_signed_bob.apex", 490 }, 491 cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --out $(out) $(location :com.android.apex.cts.shim.v3)", 492} 493 494// v3 cts shim package signed by bob + lineage 495java_genrule { 496 name: "com.android.apex.cts.shim.v3_signed_bob_rot", 497 out: ["com.android.apex.cts.shim.v3_signed_bob_rot"], 498 tools: [":apksigner"], 499 srcs: [ 500 ":com.android.apex.cts.shim.v3", 501 ":com.android.apex.rotation.key.bob.x509.pem", 502 ":com.android.apex.rotation.key.bob.pk8", 503 ":com.android.apex.rotation.key.bob.rot", 504 ], 505 dist: { 506 targets: ["com.android.apex.cts.shim.v3_signed_bob_rot"], 507 dest: "com.android.apex.cts.shim.v3_signed_bob_rot.apex", 508 }, 509 cmd: "$(location :apksigner) sign --v1-signing-enabled false --v2-signing-enabled false --key $(location :com.android.apex.rotation.key.bob.pk8) --cert $(location :com.android.apex.rotation.key.bob.x509.pem) --lineage $(location :com.android.apex.rotation.key.bob.rot) --rotation-min-sdk-version 28 --out $(out) $(location :com.android.apex.cts.shim.v3)", 510} 511 512// This one is only used in ApexdHostTest and not meant to be installed 513// and hence shouldn't be allowed in hash.txt of v1 shim APEX. 514apex { 515 name: "com.android.apex.cts.shim.v2_legacy", 516 manifest: "manifest_v2.json", 517 androidManifest: "AndroidManifest.xml", 518 file_contexts: ":apex.test-file_contexts", 519 key: "com.android.apex.cts.shim.key", 520 prebuilts: ["hash_of_dev_null"], 521 apps: [ 522 "CtsShim", 523 "CtsShimPriv", 524 ], 525 installable: false, 526 min_sdk_version: "29", 527 updatable: false, 528} 529 530java_genrule { 531 name: "com.android.apex.cts.shim.v2_no_pb", 532 srcs: [":com.android.apex.cts.shim.v2_legacy"], 533 out: ["com.android.apex.cts.shim.v2_no_pb.apex"], 534 tools: ["zip2zip"], 535 cmd: "$(location zip2zip) -i $(in) -x apex_manifest.pb -o $(out)", 536} 537 538// Apex shim that targets an old sdk (P) 539apex { 540 name: "com.android.apex.cts.shim.v2_sdk_target_p", 541 // Use manifest_v2_rebootless to also re-use this APEX in the rebootless update test case. 542 manifest: "manifest_v2_rebootless.json", 543 androidManifest: "AndroidManifestSdkTargetP.xml", 544 file_contexts: ":apex.test-file_contexts", 545 key: "com.android.apex.cts.shim.key", 546 prebuilts: ["hash_of_dev_null"], 547 installable: false, 548 apps: [ 549 "CtsShim", 550 "CtsShimPriv", 551 ], 552 updatable: false, 553} 554 555// Apex shim with apk-in-apex that targets sdk P 556apex { 557 name: "com.android.apex.cts.shim.v2_apk_in_apex_sdk_target_p", 558 manifest: "manifest_v2.json", 559 androidManifest: "AndroidManifest.xml", 560 file_contexts: ":apex.test-file_contexts", 561 key: "com.android.apex.cts.shim.key", 562 prebuilts: ["hash_of_dev_null"], 563 apps: ["CtsShimTargetPSdk"], 564 installable: false, 565 updatable: false, 566} 567 568// Apex shim with unsigned apk 569java_genrule { 570 name: "com.android.apex.cts.shim.v2_unsigned_apk_container", 571 // Use shim.v2_rebootless to re-use same APEX in the rebootless update test case. 572 srcs: [":com.android.apex.cts.shim.v2_rebootless"], 573 out: ["com.android.apex.cts.shim.v2_unsigned_apk_container.apex"], 574 cmd: "cp -v $(in) $(out) && zip -d $(out) META-INF*", 575 dist: { 576 targets: ["com.android.apex.cts.shim.v2_unsigned_apk_container"], 577 dest: "com.android.apex.cts.shim.v2_unsigned_apk_container.apex", 578 }, 579} 580 581// Apex shim for testing rebootless updates 582apex { 583 name: "com.android.apex.cts.shim.v2_rebootless", 584 manifest: "manifest_v2_rebootless.json", 585 file_contexts: ":apex.test-file_contexts", 586 key: "com.android.apex.cts.shim.key", 587 prebuilts: ["hash_of_dev_null"], 588 installable: false, 589 updatable: false, 590} 591 592apex { 593 name: "com.android.apex.cts.shim.v3_rebootless", 594 manifest: "manifest_v3_rebootless.json", 595 file_contexts: ":apex.test-file_contexts", 596 key: "com.android.apex.cts.shim.key", 597 prebuilts: ["hash_of_dev_null"], 598 installable: false, 599 updatable: false, 600} 601 602// Apex shim with upgraded apk-in-apexes 603apex { 604 name: "com.android.apex.cts.shim.v2_apk_in_apex_upgrades", 605 manifest: "manifest_v2.json", 606 androidManifest: "AndroidManifest.xml", 607 file_contexts: ":apex.test-file_contexts", 608 key: "com.android.apex.cts.shim.key", 609 prebuilts: ["hash_of_dev_null"], 610 apps: [ 611 "CtsShim", 612 "CtsShimPrivUpgrade", 613 ], 614 installable: false, 615 updatable: false, 616} 617 618apex { 619 name: "com.android.apex.cts.shim.v2_install_constraints_empty", 620 manifest: "manifest_v2.json", 621 androidManifest: "AndroidManifestInstallConstraints_empty.xml", 622 file_contexts: ":apex.test-file_contexts", 623 key: "com.android.apex.cts.shim.key", 624 prebuilts: ["hash_of_dev_null"], 625 installable: false, 626 updatable: false, 627} 628 629apex { 630 name: "com.android.apex.cts.shim.v2_install_constraints_invalid_fingerprint", 631 manifest: "manifest_v2.json", 632 androidManifest: "AndroidManifestInstallConstraints_invalid_fingerprint.xml", 633 file_contexts: ":apex.test-file_contexts", 634 key: "com.android.apex.cts.shim.key", 635 prebuilts: ["hash_of_dev_null"], 636 installable: false, 637 updatable: false, 638} 639 640apex { 641 name: "com.android.apex.cts.shim.v2_install_constraints_no_value", 642 manifest: "manifest_v2.json", 643 androidManifest: "AndroidManifestInstallConstraints_no_value.xml", 644 file_contexts: ":apex.test-file_contexts", 645 key: "com.android.apex.cts.shim.key", 646 prebuilts: ["hash_of_dev_null"], 647 installable: false, 648 updatable: false, 649} 650 651// Apex shim for running a new app in an apex 652apex { 653 name: "com.android.apex.cts.shim.v2_add_apk_to_apex", 654 manifest: "manifest_v2.json", 655 file_contexts: ":apex.test-file_contexts", 656 key: "com.android.apex.cts.shim.key", 657 prebuilts: ["hash_of_dev_null"], 658 apps: ["CtsShimAddApkToApex"], 659 installable: false, 660 updatable: false, 661} 662