1// List of clang-tidy checks that are reported as errors. 2// Please keep this list ordered lexicographically. 3package { 4 default_applicable_licenses: ["Android-Apache-2.0"], 5} 6 7tidy_errors = [ 8 "android-*", 9 "bugprone-infinite-loop", 10 "bugprone-macro-parentheses", 11 "bugprone-misplaced-widening-cast", 12 "bugprone-move-forwarding-reference", 13 "bugprone-sizeof-container", 14 "bugprone-sizeof-expression", 15 "bugprone-string-constructor", 16 "bugprone-terminating-continue", 17 "bugprone-undefined-memory-manipulation", 18 "bugprone-undelegated-constructor", 19 // "bugprone-unhandled-self-assignment", // found in apex_manifest.proto 20 "bugprone-unused-raii", 21 "cert-err34-c", 22 "google-default-arguments", 23 // "google-explicit-constructor", // found in com_android_apex.h 24 "google-readability-avoid-underscore-in-googletest-name", 25 "google-readability-todo", 26 "google-runtime-int", 27 "google-runtime-member-string-references", 28 "misc-move-const-arg", 29 "misc-move-forwarding-reference", 30 // "misc-unused-parameters", // found in apexd_utils.h 31 "misc-unused-using-decls", 32 "misc-use-after-move", 33 // "modernize-pass-by-value", // found in apex_database.h 34 "performance-faster-string-find", 35 "performance-for-range-copy", 36 "performance-implicit-conversion-in-loop", 37 "performance-inefficient-vector-operation", 38 "performance-move-const-arg", 39 // "performance-move-constructor-init", // found in apexd_loop.h 40 "performance-noexcept-move-constructor", 41 "performance-unnecessary-copy-initialization", 42 "performance-unnecessary-value-param", 43 // "readability-avoid-const-params-in-decls", // found in apexd.h 44] 45 46cc_defaults { 47 name: "apex_flags_defaults", 48 cflags: [ 49 "-Wall", 50 "-Wextra", 51 "-Werror", 52 "-Wno-unused-parameter", 53 54 // Some extra flags. 55 "-fstrict-aliasing", 56 "-Wredundant-decls", 57 "-Wshadow", 58 "-Wstrict-aliasing", 59 "-Wthread-safety", 60 "-Wthread-safety-negative", 61 "-Wunreachable-code", 62 "-Wunreachable-code-break", 63 "-Wunreachable-code-return", 64 "-Wunused", 65 "-Wused-but-marked-unused", 66 ] + select(release_flag("RELEASE_AVF_ENABLE_EARLY_VM"), { 67 true: ["-DRELEASE_AVF_ENABLE_EARLY_VM"], 68 default: [], 69 }), 70 tidy: true, 71 tidy_checks: tidy_errors, 72 tidy_checks_as_errors: tidy_errors, 73 tidy_flags: [ 74 "-format-style=file", 75 "-header-filter=system/apex/", 76 ], 77} 78 79cc_defaults { 80 name: "libapexd-deps", 81 defaults: ["libapex-deps"], 82 shared_libs: [ 83 "liblog", 84 "liblogwrap", 85 "libvintf", 86 ], 87 static_libs: [ 88 "lib_apex_blocklist_proto", 89 "lib_microdroid_metadata_proto", 90 "libapex", 91 "libavb", 92 "libdm", 93 "libext2_uuid", 94 "libsigningutils", 95 "libtinyxml2", 96 "libverity_tree", 97 "libvold_binder", 98 ], 99 whole_static_libs: ["libcom.android.sysprop.apex"], 100} 101 102aidl_interface { 103 name: "apex_aidl_interface", 104 unstable: true, 105 srcs: [ 106 "aidl/android/apex/ApexInfo.aidl", 107 "aidl/android/apex/ApexInfoList.aidl", 108 "aidl/android/apex/ApexSessionInfo.aidl", 109 "aidl/android/apex/ApexSessionParams.aidl", 110 "aidl/android/apex/CompressedApexInfo.aidl", 111 "aidl/android/apex/CompressedApexInfoList.aidl", 112 "aidl/android/apex/IApexService.aidl", 113 ], 114 local_include_dir: "aidl", 115 backend: { 116 java: { 117 sdk_version: "28", 118 }, 119 ndk: { 120 enabled: false, 121 }, 122 }, 123} 124 125cc_binary { 126 name: "apexd", 127 defaults: [ 128 "apex_flags_defaults", 129 "libapex-deps", 130 "libapexd-deps", 131 "libapexservice-deps", 132 "libapexd_metrics_stats-deps", 133 ], 134 srcs: [ 135 "apexd_main.cpp", 136 ], 137 shared_libs: [ 138 "server_configurable_flags", 139 "brand_new_apex_flag_c_lib", 140 ], 141 static_libs: [ 142 "libapex", 143 "libapexd", 144 "libapexd_checkpoint_vold", 145 "libapexservice", 146 "libapexd_metrics_stats", 147 ], 148 init_rc: ["apexd.rc"], 149 // Just like the init, apexd should be able to run without 150 // any APEX activated. To do so, it uses the bootstrap linker 151 // and the bootstrap bionic libraries. 152 bootstrap: true, 153} 154 155cc_binary { 156 name: "apexd.microdroid", 157 defaults: [ 158 "apex_flags_defaults", 159 "libapex-deps", 160 "libapexd-deps", 161 ], 162 srcs: [ 163 "apexd_microdroid.cpp", 164 ], 165 static_libs: [ 166 "libapex", 167 "libapexd", 168 // Prefer static-link as, in microdroid, apexd is the only client. 169 // Using the -ndk variant since libprotobuf-cpp-full is supposed to be 170 // used as a shared lib in general in Android. 171 "libprotobuf-cpp-full-ndk", 172 ], 173 exclude_shared_libs: [ 174 "libprotobuf-cpp-full", 175 "libvintf", 176 ], 177 // Just like the init, apexd should be able to run without 178 // any APEX activated. To do so, it uses the bootstrap linker 179 // and the bootstrap bionic libraries. 180 bootstrap: true, 181 // This variant is for microdroid. 182 no_full_install: true, 183 // init depends on the name "apexd". 184 stem: "apexd", 185} 186 187cc_library_static { 188 name: "libapexd", 189 defaults: [ 190 "apex_flags_defaults", 191 "libapexd-deps", 192 ], 193 srcs: [ 194 "apex_blocklist.cpp", 195 "apex_classpath.cpp", 196 "apex_database.cpp", 197 "apex_file_repository.cpp", 198 "apexd_brand_new_verifier.cpp", 199 "apexd.cpp", 200 "apexd_dm.cpp", 201 "apexd_lifecycle.cpp", 202 "apexd_loop.cpp", 203 "apexd_metrics.cpp", 204 "apexd_private.cpp", 205 "apexd_session.cpp", 206 "apexd_verity.cpp", 207 "apexd_vendor_apex.cpp", 208 ], 209 export_include_dirs: ["."], 210 generated_sources: ["apex-info-list-tinyxml"], 211 // Don't add shared/static libs here; add to libapexd_defaults instead. 212} 213 214cc_library_static { 215 name: "libapexd_checkpoint_vold", 216 defaults: ["apex_flags_defaults"], 217 srcs: ["apexd_checkpoint_vold.cpp"], 218 shared_libs: [ 219 "libbase", 220 "libutils", 221 ], 222 static_libs: [ 223 "libvold_binder", 224 ], 225 export_include_dirs: ["."], 226} 227 228cc_defaults { 229 name: "libapexservice-deps", 230 shared_libs: [ 231 "apex_aidl_interface-cpp", 232 "libbinder", 233 "libutils", 234 ], 235} 236 237cc_library_static { 238 name: "libapexservice", 239 defaults: [ 240 "apex_flags_defaults", 241 "libapexd-deps", 242 "libapexservice-deps", 243 ], 244 srcs: ["apexservice.cpp"], 245 static_libs: [ 246 "libapexd", 247 ], 248 cflags: [ 249 "-DANDROID_UTILS_REF_BASE_DISABLE_IMPLICIT_CONSTRUCTION", 250 ], 251} 252 253cc_defaults { 254 name: "libapex-deps", 255 shared_libs: [ 256 "libbase", 257 "libcrypto", 258 "libcutils", 259 "libprotobuf-cpp-full", 260 "libziparchive", 261 "libselinux", 262 ], 263 static_libs: [ 264 "lib_apex_session_state_proto", 265 "lib_apex_manifest_proto", 266 "libavb", 267 ], 268 cpp_std: "experimental", 269} 270 271cc_library_static { 272 name: "libapex", 273 defaults: [ 274 "apex_flags_defaults", 275 "libapex-deps", 276 ], 277 srcs: [ 278 "apex_file.cpp", 279 "apex_manifest.cpp", 280 "apex_sha.cpp", 281 "apex_shim.cpp", 282 "apexd_verity.cpp", 283 ], 284 host_supported: true, 285 target: { 286 darwin: { 287 enabled: false, 288 }, 289 }, 290 header_libs: [ 291 "libutils_headers", 292 ], 293 export_header_lib_headers: [ 294 "libutils_headers", 295 ], 296 export_include_dirs: ["."], 297} 298 299java_genrule { 300 // Generates an apex which has a different manifest outside the filesystem 301 // image. 302 name: "gen_manifest_mismatch_apex", 303 out: ["apex.apexd_test_manifest_mismatch.apex"], 304 srcs: [":apex.apexd_test"], 305 tools: [ 306 "soong_zip", 307 "zipalign", 308 "conv_apex_manifest", 309 ], 310 cmd: "unzip -q $(in) -d $(genDir) && " + 311 "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + 312 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 313 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 314 "-o $(genDir)/unaligned.apex && " + 315 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 316 "$(genDir)/apex.apexd_test_manifest_mismatch.apex", 317} 318 319java_genrule { 320 // Generates an apex with a corrupted filesystem superblock, which should cause 321 // Apex::Open to fail 322 name: "gen_corrupt_superblock_apex", 323 out: ["apex.apexd_test_corrupt_superblock_apex.apex"], 324 srcs: [":apex.apexd_test"], 325 tools: [ 326 "soong_zip", 327 "zipalign", 328 ], 329 cmd: "unzip -q $(in) -d $(genDir) && " + 330 "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=1 count=1 && " + 331 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 332 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 333 "-o $(genDir)/unaligned.apex && " + 334 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 335 "$(genDir)/apex.apexd_test_corrupt_superblock_apex.apex", 336} 337 338java_genrule { 339 // Generates an apex with a corrupted filesystem image, which should cause 340 // dm-verity verification to fail 341 name: "gen_corrupt_apex", 342 out: ["apex.apexd_test_corrupt_apex.apex"], 343 srcs: [":apex.apexd_test"], 344 tools: [ 345 "soong_zip", 346 "zipalign", 347 ], 348 cmd: "unzip -q $(in) -d $(genDir) && " + 349 "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + 350 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 351 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 352 "-o $(genDir)/unaligned.apex && " + 353 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 354 "$(genDir)/apex.apexd_test_corrupt_apex.apex", 355} 356 357java_genrule { 358 // Extract the root digest with avbtool 359 name: "apex.apexd_test_digest", 360 out: ["apex.apexd_test_digest.txt"], 361 srcs: [":apex.apexd_test"], 362 tools: ["avbtool"], 363 cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + 364 "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + 365 "| cut -c 3-| tee $(out)", 366} 367 368java_genrule { 369 // Extract the root digest with avbtool 370 name: "apex.apexd_test_f2fs_digest", 371 out: ["apex.apexd_test_f2fs_digest.txt"], 372 srcs: [":apex.apexd_test_f2fs"], 373 tools: ["avbtool"], 374 cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + 375 "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + 376 "| cut -c 3-| tee $(out)", 377} 378 379java_genrule { 380 // Extract the root digest with avbtool 381 name: "apex.apexd_test_erofs_digest", 382 out: ["apex.apexd_test_erofs_digest.txt"], 383 srcs: [":apex.apexd_test_erofs"], 384 tools: ["avbtool"], 385 cmd: "unzip -q $(in) -d $(genDir) apex_payload.img && " + 386 "$(location avbtool) print_partition_digests --image $(genDir)/apex_payload.img " + 387 "| cut -c 3-| tee $(out)", 388} 389 390java_genrule { 391 // Generates an apex which has same module name as apex.apexd_test.apex, but 392 // is actually signed with a different key. 393 name: "gen_key_mismatch_apex", 394 out: ["apex.apexd_test_different_key.apex"], 395 srcs: [":apex.apexd_test_no_inst_key"], 396 tools: [ 397 "soong_zip", 398 "zipalign", 399 "conv_apex_manifest", 400 ], 401 cmd: "unzip -q $(in) -d $(genDir) && " + 402 "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + 403 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 404 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 405 "-o $(genDir)/unaligned.apex && " + 406 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 407 "$(genDir)/apex.apexd_test_different_key.apex", 408} 409 410java_genrule { 411 // Generates an apex which has same module name as apex.apexd_test.apex, but 412 // is actually signed with a different key. 413 name: "gen_key_mismatch_apex_v2", 414 out: ["apex.apexd_test_different_key_v2.apex"], 415 srcs: [":apex.apexd_test_no_inst_key"], 416 tools: [ 417 "soong_zip", 418 "zipalign", 419 "conv_apex_manifest", 420 ], 421 cmd: "unzip -q $(in) -d $(genDir) && " + 422 "$(location conv_apex_manifest) setprop name com.android.apex.test_package $(genDir)/apex_manifest.pb && " + 423 "$(location conv_apex_manifest) setprop version 2 $(genDir)/apex_manifest.pb && " + 424 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 425 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 426 "-o $(genDir)/unaligned.apex && " + 427 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 428 "$(genDir)/apex.apexd_test_different_key_v2.apex", 429} 430 431java_genrule { 432 // Generates an apex which has a different manifest outside the filesystem 433 // image. 434 name: "gen_manifest_mismatch_rebootless_apex", 435 out: ["test.rebootless_apex_manifest_mismatch.apex"], 436 srcs: [":test.rebootless_apex_v1"], 437 tools: [ 438 "soong_zip", 439 "zipalign", 440 "conv_apex_manifest", 441 ], 442 cmd: "unzip -q $(in) -d $(genDir) && " + 443 "$(location conv_apex_manifest) setprop version 137 $(genDir)/apex_manifest.pb && " + 444 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 445 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 446 "-o $(genDir)/unaligned.apex && " + 447 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 448 "$(genDir)/test.rebootless_apex_manifest_mismatch.apex", 449} 450 451java_genrule { 452 // Generates an apex with a corrupted filesystem image, which should cause 453 // dm-verity verification to fail 454 name: "gen_corrupt_rebootless_apex", 455 out: ["test.rebootless_apex_corrupted.apex"], 456 srcs: [":test.rebootless_apex_v1"], 457 tools: [ 458 "soong_zip", 459 "zipalign", 460 ], 461 cmd: "unzip -q $(in) -d $(genDir) && " + 462 "dd if=/dev/zero of=$(genDir)/apex_payload.img conv=notrunc bs=1024 seek=16 count=1 && " + 463 "$(location soong_zip) -d -C $(genDir) -D $(genDir) " + 464 "-s apex_manifest.pb -s apex_payload.img -s apex_pubkey " + 465 "-o $(genDir)/unaligned.apex && " + 466 "$(location zipalign) -f 4096 $(genDir)/unaligned.apex " + 467 "$(genDir)/test.rebootless_apex_corrupted.apex", 468} 469 470cc_test { 471 name: "ApexTestCases", 472 defaults: [ 473 "apex_flags_defaults", 474 "libapex-deps", 475 "libapexd-deps", 476 ], 477 require_root: true, 478 cflags: [ 479 // Otherwise libgmock won't compile. 480 "-Wno-used-but-marked-unused", 481 ], 482 data: [ 483 ":apex.apexd_bootstrap_test", 484 ":apex.apexd_test", 485 ":apex.apexd_test_erofs", 486 ":apex.apexd_test_f2fs", 487 ":apex.apexd_test_digest", 488 ":apex.apexd_test_erofs_digest", 489 ":apex.apexd_test_f2fs_digest", 490 ":apex.apexd_test_classpath", 491 ":apex.apexd_test_different_app", 492 ":apex.apexd_test_no_inst_key", 493 ":apex.apexd_test_f2fs_no_inst_key", 494 ":apex.apexd_test_nocode", 495 ":apex.apexd_test_v2", 496 ":apex.corrupted_b146895998", 497 ":apex.banned_name", 498 ":gen_key_mismatch_apex", 499 ":gen_key_mismatch_apex_v2", 500 ":gen_key_mismatch_capex", 501 ":gen_manifest_mismatch_apex", 502 ":gen_corrupt_superblock_apex", 503 ":gen_corrupt_apex", 504 ":gen_capex_not_decompressible", 505 ":gen_capex_without_apex", 506 ":gen_capex_with_v2_apex", 507 ":gen_key_mismatch_with_original_capex", 508 ":com.android.apex.brand.new", 509 ":com.android.apex.brand.new.v2", 510 ":com.android.apex.brand.new.v2.diffkey", 511 ":com.android.apex.cts.shim.v1_prebuilt", 512 ":com.android.apex.cts.shim.v2_prebuilt", 513 ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", 514 ":com.android.apex.cts.shim.v2_additional_file_prebuilt", 515 ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", 516 ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", 517 ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", 518 ":com.android.apex.compressed_sharedlibs", 519 ":com.android.apex.compressed.v1", 520 ":com.android.apex.compressed.v1_different_digest", 521 ":com.android.apex.compressed.v1_different_digest_original", 522 ":com.android.apex.compressed.v1{.apex}", 523 ":com.android.apex.compressed.v2", 524 ":com.android.apex.compressed.v2_original", 525 ":gen_manifest_mismatch_compressed_apex_v2", 526 "apexd_testdata/com.android.apex.test_package.avbpubkey", 527 "apexd_testdata/com.android.apex.compressed.avbpubkey", 528 "apexd_testdata/com.android.apex.brand.new.avbpubkey", 529 "apexd_testdata/com.android.apex.brand.new.another.avbpubkey", 530 "apexd_testdata/com.android.apex.brand.new.renamed.avbpubkey", 531 "apexd_testdata/blocklist.json", 532 "apexd_testdata/blocklist_invalid.json", 533 ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", 534 ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", 535 ":test.rebootless_apex_v1", 536 ":test.rebootless_apex_v2", 537 ":test.rebootless_apex_service_v1", 538 ":test.rebootless_apex_service_v2", 539 ":gen_manifest_mismatch_rebootless_apex", 540 ":gen_corrupt_rebootless_apex", 541 ":test.rebootless_apex_provides_sharedlibs", 542 ":test.rebootless_apex_provides_native_libs", 543 ":test.rebootless_apex_requires_shared_apex_libs", 544 ":test.rebootless_apex_jni_libs", 545 ":test.rebootless_apex_add_native_lib", 546 ":test.rebootless_apex_remove_native_lib", 547 ":test.rebootless_apex_app_in_apex", 548 ":test.rebootless_apex_priv_app_in_apex", 549 ":com.android.apex.vendor.foo", 550 ":com.android.apex.vendor.foo.with_vintf", 551 ], 552 srcs: [ 553 "apex_blocklist_test.cpp", 554 "apex_classpath_test.cpp", 555 "apex_database_test.cpp", 556 "apex_file_test.cpp", 557 "apex_file_repository_test.cpp", 558 "apex_manifest_test.cpp", 559 "apexd_brand_new_verifier_test.cpp", 560 "apexd_test.cpp", 561 "apexd_session_test.cpp", 562 "apexd_utils_test.cpp", 563 ], 564 host_supported: false, 565 compile_multilib: "first", 566 static_libs: [ 567 "apex_aidl_interface-cpp", 568 "libapex", 569 "libapexd", 570 "libfstab", 571 "libgmock", 572 ], 573 shared_libs: [ 574 "libbinder", 575 "libfs_mgr", 576 "libutils", 577 ], 578 generated_sources: ["apex-info-list-tinyxml"], 579 test_suites: ["device-tests"], 580 test_config: "ApexTestCases.xml", 581} 582 583cc_test { 584 name: "ApexServiceTestCases", 585 defaults: [ 586 "apex_flags_defaults", 587 "libapex-deps", 588 "libapexd-deps", 589 ], 590 require_root: true, 591 cflags: [ 592 // Otherwise libgmock won't compile. 593 "-Wno-used-but-marked-unused", 594 ], 595 data: [ 596 ":apex.apexd_test", 597 ":apex.apexd_test_erofs", 598 ":apex.apexd_test_f2fs", 599 ":apex.apexd_test_digest", 600 ":apex.apexd_test_erofs_digest", 601 ":apex.apexd_test_f2fs_digest", 602 ":apex.apexd_test_classpath", 603 ":apex.apexd_test_different_app", 604 ":apex.apexd_test_no_inst_key", 605 ":apex.apexd_test_f2fs_no_inst_key", 606 ":apex.apexd_test_nocode", 607 ":apex.apexd_test_v2", 608 ":apex.corrupted_b146895998", 609 ":apex.banned_name", 610 ":gen_key_mismatch_apex", 611 ":gen_key_mismatch_apex_v2", 612 ":gen_key_mismatch_capex", 613 ":gen_manifest_mismatch_apex", 614 ":gen_corrupt_superblock_apex", 615 ":gen_corrupt_apex", 616 ":gen_capex_not_decompressible", 617 ":gen_capex_without_apex", 618 ":gen_capex_with_v2_apex", 619 ":gen_key_mismatch_with_original_capex", 620 ":com.android.apex.cts.shim.v1_prebuilt", 621 ":com.android.apex.cts.shim.v2_prebuilt", 622 ":com.android.apex.cts.shim.v2_wrong_sha_prebuilt", 623 ":com.android.apex.cts.shim.v2_additional_file_prebuilt", 624 ":com.android.apex.cts.shim.v2_additional_folder_prebuilt", 625 ":com.android.apex.cts.shim.v2_with_pre_install_hook_prebuilt", 626 ":com.android.apex.cts.shim.v2_with_post_install_hook_prebuilt", 627 ":com.android.apex.compressed_sharedlibs", 628 ":com.android.apex.compressed.v1", 629 ":com.android.apex.compressed.v1_different_digest", 630 ":com.android.apex.compressed.v1_different_digest_original", 631 ":com.android.apex.compressed.v1{.apex}", 632 ":com.android.apex.compressed.v2", 633 ":com.android.apex.compressed.v2_original", 634 ":gen_manifest_mismatch_compressed_apex_v2", 635 "apexd_testdata/com.android.apex.test_package.avbpubkey", 636 "apexd_testdata/com.android.apex.compressed.avbpubkey", 637 ":com.android.apex.test.sharedlibs_generated.v1.libvX_prebuilt", 638 ":com.android.apex.test.sharedlibs_generated.v2.libvY_prebuilt", 639 ":test.rebootless_apex_v1", 640 ":test.rebootless_apex_v2", 641 ":test.rebootless_apex_service_v1", 642 ":test.rebootless_apex_service_v2", 643 ":gen_manifest_mismatch_rebootless_apex", 644 ":gen_corrupt_rebootless_apex", 645 ":test.rebootless_apex_provides_sharedlibs", 646 ":test.rebootless_apex_provides_native_libs", 647 ":test.rebootless_apex_requires_shared_apex_libs", 648 ":test.rebootless_apex_jni_libs", 649 ":test.rebootless_apex_add_native_lib", 650 ":test.rebootless_apex_remove_native_lib", 651 ":test.rebootless_apex_app_in_apex", 652 ":test.rebootless_apex_priv_app_in_apex", 653 ], 654 srcs: [ 655 "apexservice_test.cpp", 656 ], 657 host_supported: false, 658 compile_multilib: "first", 659 static_libs: [ 660 "apex_aidl_interface-cpp", 661 "libapex", 662 "libapexd", 663 "libfstab", 664 "libgmock", 665 ], 666 shared_libs: [ 667 "libbinder", 668 "libfs_mgr", 669 "libutils", 670 ], 671 generated_sources: ["apex-info-list-tinyxml"], 672 test_suites: ["device-tests"], 673 test_config: "ApexServiceTestCases.xml", 674} 675 676xsd_config { 677 name: "apex-info-list", 678 srcs: ["ApexInfoList.xsd"], 679 package_name: "com.android.apex", 680 api_dir: "apex-info-list-api", 681 gen_writer: true, 682 root_elements: ["apex-info-list"], 683} 684 685xsd_config { 686 name: "apex-info-list-tinyxml", 687 srcs: ["ApexInfoList.xsd"], 688 package_name: "com.android.apex", 689 api_dir: "apex-info-list-api", 690 gen_writer: true, 691 tinyxml: true, 692 root_elements: ["apex-info-list"], 693} 694 695cc_defaults { 696 name: "libapexd_metrics_stats-deps", 697 shared_libs: [ 698 "libbase", 699 "libbinder", 700 "libutils", 701 "liblog", 702 ], 703 static_libs: [ 704 "android.os.statsbootstrap_aidl-cpp", 705 "libstatsbootstrap", 706 ], 707} 708 709cc_library_static { 710 name: "libapexd_metrics_stats", 711 defaults: [ 712 "libapexd_metrics_stats-deps", 713 ], 714 srcs: [ 715 "apexd_metrics_stats.cpp", 716 ], 717 generated_sources: [ 718 "statslog_apex.cpp", 719 ], 720 generated_headers: [ 721 "statslog_apex.h", 722 ], 723 cflags: [ 724 "-Wall", 725 "-Werror", 726 ], 727} 728 729genrule { 730 name: "statslog_apex.h", 731 tools: ["stats-log-api-gen"], 732 cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_apex.h --module apex --namespace stats,apex --bootstrap", 733 out: [ 734 "statslog_apex.h", 735 ], 736} 737 738genrule { 739 name: "statslog_apex.cpp", 740 tools: ["stats-log-api-gen"], 741 cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_apex.cpp --module apex --namespace stats,apex --importHeader statslog_apex.h --bootstrap", 742 out: [ 743 "statslog_apex.cpp", 744 ], 745} 746 747aconfig_declarations { 748 name: "enable_brand_new_apex", 749 package: "com.android.apex.flags", 750 srcs: ["apexd.aconfig"], 751 container: "system", 752} 753 754cc_aconfig_library { 755 name: "brand_new_apex_flag_c_lib", 756 aconfig_declarations: "enable_brand_new_apex", 757} 758